Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/facebook/luaffifb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Cormack <justin@specialbusservice.com>2013-11-08 22:58:44 +0400
committerJustin Cormack <justin@specialbusservice.com>2013-11-08 22:58:44 +0400
commita7ba13eaad669c5be7804b856f72dde55227bf4d (patch)
tree0152b9ef6857f353f7675ffc8d3f3d69968ded23
parent1473dc6fedaf07ae186455b6962604230bb495b6 (diff)
LuaJIT dlopens ffi libraries with RTLD_LAZY not RTLD_NOW so do the same here
-rw-r--r--ffi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi.h b/ffi.h
index c13a985..0985f3e 100644
--- a/ffi.h
+++ b/ffi.h
@@ -179,7 +179,7 @@ static char* luaL_prepbuffsize(luaL_Buffer* B, size_t sz) {
#else
# define LIB_FORMAT_1 "%s.so"
# define LIB_FORMAT_2 "lib%s.so"
-# define LoadLibraryA(name) dlopen(name, RTLD_NOW | RTLD_GLOBAL)
+# define LoadLibraryA(name) dlopen(name, RTLD_LAZY | RTLD_GLOBAL)
# define GetProcAddressA(lib, name) dlsym(lib, name)
# define AllocPage(size) mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0)
# define FreePage(data, size) munmap(data, size)