summaryrefslogtreecommitdiff
path: root/external/nss/macos-dlopen.patch.0
blob: 8c484e4c6841e77aae41c397cd59e53c65b06a48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- nspr/pr/src/linking/prlink.c
+++ nspr/pr/src/linking/prlink.c
@@ -793,7 +793,7 @@
         /* ensure the file exists if it contains a slash character i.e. path */
         /* DARWIN's dlopen ignores the provided path and checks for the */
         /* plain filename in DYLD_LIBRARY_PATH */
-        if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL ||
+        if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL || strncmp(name, "@loader_path/", 13) == 0 ||
             PR_Access(name, PR_ACCESS_EXISTS) == PR_SUCCESS) {
             h = dlopen(name, dl_flags);
         }
--- nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c
+++ nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c
@@ -224,7 +224,11 @@
 static PRStatus PR_CALLBACK pkix_getDecodeFunction(void)
 {
     pkix_decodeFunc.smimeLib = 
+#if defined DARWIN
+		PR_LoadLibrary("@loader_path/" SHLIB_PREFIX"smime3."SHLIB_SUFFIX);
+#else
 		PR_LoadLibrary(SHLIB_PREFIX"smime3."SHLIB_SUFFIX);
+#endif
     if (pkix_decodeFunc.smimeLib == NULL) {
 	return PR_FAILURE;
     }