summaryrefslogtreecommitdiff
path: root/recipes/mozilla/nss-3.12/90_realpath.dpatch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2010-04-16 10:17:50 +0200
committerKoen Kooi <koen@openembedded.org>2010-04-16 10:17:50 +0200
commitbf18c876b0b6dd542f80dfccd575d9fa2c3a4fdf (patch)
tree279c8491ed91af425aee0a675591a351948f3975 /recipes/mozilla/nss-3.12/90_realpath.dpatch
parent199effd4c7b1b62bc133a577e42d7043ee7202e7 (diff)
nss 3.12: import from jalimo, convert to new style staging, convert to new style checksums, fix QA errors, fix packaging
Diffstat (limited to 'recipes/mozilla/nss-3.12/90_realpath.dpatch')
-rw-r--r--recipes/mozilla/nss-3.12/90_realpath.dpatch29
1 files changed, 29 insertions, 0 deletions
diff --git a/recipes/mozilla/nss-3.12/90_realpath.dpatch b/recipes/mozilla/nss-3.12/90_realpath.dpatch
new file mode 100644
index 0000000000..46e12d05b0
--- /dev/null
+++ b/recipes/mozilla/nss-3.12/90_realpath.dpatch
@@ -0,0 +1,29 @@
+Index: mozilla/security/nss/lib/freebl/genload.c
+===================================================================
+--- mozilla.orig/security/nss/lib/freebl/genload.c 2008-07-23 20:20:36.000000000 +0200
++++ mozilla/security/nss/lib/freebl/genload.c 2008-07-23 20:20:39.000000000 +0200
+@@ -62,6 +62,16 @@
+ */
+ static char* loader_GetOriginalPathname(const char* link)
+ {
++#ifdef __GLIBC__
++ char* tmp = realpath(link, NULL);
++ char* resolved;
++ if (! tmp)
++ return NULL;
++ resolved = PR_Malloc(strlen(tmp) + 1);
++ strcpy(resolved, tmp); /* This is necessary because PR_Free might not be using free() */
++ free(tmp);
++ return resolved;
++#else
+ char* resolved = NULL;
+ char* input = NULL;
+ PRUint32 iterations = 0;
+@@ -96,6 +106,7 @@
+ input = NULL;
+ }
+ return input;
++#endif
+ }
+ #endif /* XP_UNIX */
+