Browse Source

explicit option RTLD_LOCAL instead of 0 (Posix does not fix

a default for dlopen)
pull/9/head
Roberto Ierusalimschy 13 years ago
parent
commit
aea68e5c54
  1. 4
      loadlib.c

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

Loading…
Cancel
Save