summaryrefslogtreecommitdiff
path: root/data/patches/gnuzilla-bug-1030899-2.patch
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@gnu.org>2015-03-08 15:14:03 +0000
committerRuben Rodriguez <ruben@gnu.org>2015-03-08 15:14:03 +0000
commit9a0fd32cf6e2ada37675bc743532c5004b16e5e3 (patch)
treed66faa3279486d2e8ad72bf70e7ef522460372a0 /data/patches/gnuzilla-bug-1030899-2.patch
parent2732de330618bc29b7ab07f4004d8e84f698cf95 (diff)
Added patches to fix build bugs for Windows, MacOS and Android
Diffstat (limited to 'data/patches/gnuzilla-bug-1030899-2.patch')
-rw-r--r--data/patches/gnuzilla-bug-1030899-2.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/data/patches/gnuzilla-bug-1030899-2.patch b/data/patches/gnuzilla-bug-1030899-2.patch
new file mode 100644
index 0000000..55728ab
--- /dev/null
+++ b/data/patches/gnuzilla-bug-1030899-2.patch
@@ -0,0 +1,59 @@
+--- a/memory/mozjemalloc/jemalloc.c
++++ a/memory/mozjemalloc/jemalloc.c
+@@ -220,17 +220,16 @@
+
+ #ifdef MALLOC_PAGEFILE
+ /* Write size when initializing a page file. */
+ # define MALLOC_PAGEFILE_WRITE_SIZE 512
+ #endif
+
+ #if defined(MOZ_MEMORY_LINUX) && !defined(MOZ_MEMORY_ANDROID)
+ #define _GNU_SOURCE /* For mremap(2). */
+-#define issetugid() 0
+ #if 0 /* Enable in order to test decommit code on Linux. */
+ # define MALLOC_DECOMMIT
+ #endif
+ #endif
+
+ #include <sys/types.h>
+
+ #include <errno.h>
+@@ -261,17 +260,16 @@
+ #define vsnprintf _vsnprintf
+
+ #ifndef NO_TLS
+ static unsigned long tlsIndex = 0xffffffff;
+ #endif
+
+ #define __thread
+ #define _pthread_self() __threadid()
+-#define issetugid() 0
+
+ /* use MSVC intrinsics */
+ #pragma intrinsic(_BitScanForward)
+ static __forceinline int
+ ffs(int x)
+ {
+ unsigned long i;
+
+@@ -5675,18 +5673,17 @@ malloc_init_hard(void)
+ #endif
+ {
+ /* No configuration specified. */
+ buf[0] = '\0';
+ opts = buf;
+ }
+ break;
+ case 1:
+- if (issetugid() == 0 && (opts =
+- getenv("MALLOC_OPTIONS")) != NULL) {
++ if ((opts = getenv("MALLOC_OPTIONS")) != NULL) {
+ /*
+ * Do nothing; opts is already initialized to
+ * the value of the MALLOC_OPTIONS environment
+ * variable.
+ */
+ } else {
+ /* No configuration specified. */
+ buf[0] = '\0';
+