diff options
author | Adam <Adam@anope.org> | 2012-09-30 04:53:49 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-09-30 20:30:27 -0400 |
commit | 0ea5e57298ebee900f30b1440499e41a7606c550 (patch) | |
tree | 9b250867f90d12d7733c06c1046e0eec9b4e4d21 | |
parent | 3838eb1f056b5b4272be7a6a32302fc419569bbc (diff) |
Use RTLD_NOW when loading modules to resolve all symbols immediately.
This prevents modules with unresolved symbols from loading instead
of loading and crashing later.
-rw-r--r-- | src/modulemanager.cpp | 2 | ||||
-rw-r--r-- | src/win32/dl/dl.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 5e3f7b6f2..5fd2937f7 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -149,7 +149,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u) } dlerror(); - void *handle = dlopen(pbuf.c_str(), RTLD_LAZY); + void *handle = dlopen(pbuf.c_str(), RTLD_NOW); const char *err = dlerror(); if (!handle && err && *err) { diff --git a/src/win32/dl/dl.h b/src/win32/dl/dl.h index 816474039..a22b0c644 100644 --- a/src/win32/dl/dl.h +++ b/src/win32/dl/dl.h @@ -5,7 +5,7 @@ * Please read COPYING and README for further details. */ -#define RTLD_LAZY 0 +#define RTLD_NOW 0 extern void *dlopen(const char *filename, int); extern char *dlerror(void); |