From aea68e5c54effa19a3849e31c96c5e563e69557b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 28 Nov 2011 15:27:51 -0200 Subject: [PATCH] explicit option RTLD_LOCAL instead of 0 (Posix does not fix a default for dlopen) --- loadlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loadlib.c b/loadlib.c index 6b9f92af..e0e4c393 100644 --- a/loadlib.c +++ b/loadlib.c @@ -1,5 +1,5 @@ /* -** $Id: loadlib.c,v 1.104 2011/11/10 11:42:58 roberto Exp roberto $ +** $Id: loadlib.c,v 1.105 2011/11/25 12:52:03 roberto Exp roberto $ ** Dynamic library loader for Lua ** See Copyright Notice in lua.h ** @@ -132,7 +132,7 @@ static void ll_unloadlib (void *lib) { static void *ll_load (lua_State *L, const char *path, int seeglb) { - void *lib = dlopen(path, RTLD_NOW | (seeglb ? RTLD_GLOBAL : 0)); + void *lib = dlopen(path, RTLD_NOW | (seeglb ? RTLD_GLOBAL : RTLD_LOCAL)); if (lib == NULL) lua_pushstring(L, dlerror()); return lib; }