Browse Source

Load plugins with RTLD_GLOBAL, fixes Lua library exports

Jo-Philipp Wich 11 years ago
parent
commit
85e8bf57e1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugin.c

+ 1 - 1
plugin.c

@@ -43,7 +43,7 @@ int uh_plugin_init(const char *name)
 	const char *sym;
 	void *dlh;
 
-	dlh = dlopen(name, RTLD_LAZY | RTLD_LOCAL);
+	dlh = dlopen(name, RTLD_LAZY | RTLD_GLOBAL);
 	if (!dlh) {
 		fprintf(stderr, "Could not open plugin %s: %s\n", name, dlerror());
 		return -ENOENT;