Latest code fragment(s):

        Index: src/utility.cpp
===================================================================
--- src/utility.cpp	(revision 1133)
+++ src/utility.cpp	(revision 1134)
@@ -1337,3 +1337,19 @@
 
 	return true;
 }
+
+#ifndef _WIN32
+lt_dlhandle sbncLoadLibrary(const char *Filename) {
+	lt_dlhandle handle = 0;
+	lt_dladvise advise;
+
+	if (!lt_dladvise_init(&advise) && !lt_dladvise_global(&advise)) {
+		handle = lt_dlopenadvise(Filename, advise);
+	}
+
+	lt_dladvise_destroy(&advise);
+
+	return handle;
+}
+#endif
+
Index: src/unix.h
===================================================================
--- src/unix.h	(revision 1133)
+++ src/unix.h	(revision 1134)
@@ -56,7 +56,7 @@
 #define STD_INPUT_HANDLE 0
 #define STD_OUTPUT_HANDLE 1
 
-#define LoadLibrary(lpLibFileName) lt_dlopen(lpLibFileName)
+#define LoadLibrary(lpLibFileName) sbncLoadLibrary(lpLibFileName)
 #define FreeLibrary(hLibModule) hLibModule ? !lt_dlclose(hLibModule) : 0
 #define GetProcAddress(hModule, lpProcName) lt_dlsym(hModule, lpProcName)
 
Index: src/utility.h
===================================================================
--- src/utility.h	(revision 1133)
+++ src/utility.h	(revision 1134)
@@ -197,4 +197,8 @@
  */
 #define AllocFailed(Variable) AllocFailedInternal(Variable, __FILE__, __LINE__)
 
+#ifndef _WIN32
+lt_dlhandle sbncLoadLibrary(const char *Filename);
+#endif
+
 #endif /* UTILITY_H */
        

Back to News