]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/server.cpp
contrib: fix bobToolz loading
[xonotic/netradiant.git] / radiant / server.cpp
index 2a264e6dcd14ede2803c2ee7e3789f5dff3aa416..993472ae6234f0a415c1d684eac09e5bab97890b 100644 (file)
@@ -144,13 +144,19 @@ FunctionPointer findSymbol( const char* symbol ){
 
 #include <dlfcn.h>
 
+#if GDEF_OS_MACOS
+#ifndef RTLD_DEEPBIND
+#define RTLD_DEEPBIND 0
+#endif // RTLD_DEEPBIND
+#endif // GDEF_OS_MACOS
+
 class DynamicLibrary {
        void *m_library;
 public:
 typedef int ( *FunctionPointer )();
 
 DynamicLibrary( const char* filename ){
-       m_library = dlopen( filename, RTLD_NOW );
+       m_library = dlopen( filename, RTLD_NOW | (RTLD_DEEPBIND + 0) );
 }
 ~DynamicLibrary(){
        if ( !failed() ) {
@@ -172,9 +178,9 @@ FunctionPointer findSymbol( const char* symbol ){
 }
 };
 
-#else
+#else // !GDEF_OS_POSIX
 #error "unsupported platform"
-#endif
+#endif // !GDEF_OS_POSIX
 
 class DynamicLibraryModule
 {