Bugzilla Bugs 261649 and 321579: fixed BeOS build error caused by previous NSPRPUB_PRE_4_2_CLIENT_BRANCH
authorwtchang%redhat.com
Tue, 27 Dec 2005 17:13:11 +0000
branchNSPRPUB_PRE_4_2_CLIENT_BRANCH
changeset 3523 6b8eabefbcbac5625612c20e6f6b64d91a609818
parent 3522 19d10b4231464e890ce9b2e28a3ad975d92516cd
child 3533 ffe08a7c5b8d379bd08a2d6b5a03bde6217a5a4c
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. Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
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;
     }