explicit option RTLD_LOCAL instead of 0 (Posix does not fix

a default for dlopen)
This commit is contained in:
Roberto Ierusalimschy 2011-11-28 15:27:51 -02:00
parent ece042fef0
commit aea68e5c54
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}