Bugzilla Bugs 261649 and 321579: fixed BeOS build error caused by previous
authorwtchang%redhat.com
Sat, 07 Jan 2006 01:03:12 +0000
changeset 3534 f7f605c9f05dc2c0e98b9fb82f7d8f1b0ad937b8
parent 3532 12b112517986422eeeb146b14a6bb589cad22ddf
child 3535 d7e699c45f4b7e8961d577493dd0d949aa0d739f
push idunknown
push userunknown
push dateunknown
bugs261649, 321579
Bugzilla Bugs 261649 and 321579: fixed BeOS build error caused by previous checkin. BeOS uses glibc but not the dlxxx functions declared in dlfcn.h.
pr/src/linking/prlink.c
--- a/pr/src/linking/prlink.c
+++ b/pr/src/linking/prlink.c
@@ -1383,18 +1383,18 @@ PR_LoadStaticLibrary(const char *name, c
     PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("Loaded library %s (static lib)", lm->name));
     PR_ExitMonitor(pr_linker_lock);
     return result;
 }
 
 PR_IMPLEMENT(char *)
 PR_GetLibraryFilePathname(const char *name, PRFuncPtr addr)
 {
-#if defined(SOLARIS) || defined(FREEBSD) \
-        || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__)
+#if defined(USE_DLFCN) && (defined(SOLARIS) || defined(FREEBSD) \
+        || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__))
     Dl_info dli;
     char *result;
 
     if (dladdr((void *)addr, &dli) == 0) {
         PR_SetError(PR_LIBRARY_NOT_LOADED_ERROR, _MD_ERRNO());
         DLLErrorInternal(_MD_ERRNO());
         return NULL;
     }