aboutsummaryrefslogtreecommitdiffstats
path: root/main/xulrunner/uclibc-malloc_usable_size.patch
blob: f9e726d55b668e2a16bd4216826bbe2461f7a363 (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
26
diff -ru mozilla-release.orig/memory/mozalloc/Makefile.in mozilla-release/memory/mozalloc/Makefile.in
--- mozilla-release.orig/memory/mozalloc/Makefile.in	2014-03-15 05:19:31.000000000 +0000
+++ mozilla-release/memory/mozalloc/Makefile.in	2014-04-17 12:57:18.819942458 +0000
@@ -3,6 +3,10 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+ifdef MOZ_MEMORY
+SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,../jemalloc) $(call EXPAND_LIBNAME_PATH,memory,../build)
+endif
+
 STL_FLAGS	=
 ifdef _MSC_VER
 STL_FLAGS	= -D_HAS_EXCEPTIONS=0
diff -ru mozilla-release.orig/memory/mozalloc/mozalloc.cpp mozilla-release/memory/mozalloc/mozalloc.cpp
--- mozilla-release.orig/memory/mozalloc/mozalloc.cpp	2014-03-15 05:19:31.000000000 +0000
+++ mozilla-release/memory/mozalloc/mozalloc.cpp	2014-04-17 12:55:15.007704929 +0000
@@ -28,7 +28,7 @@
 #include "mozilla/mozalloc_oom.h"  // for mozalloc_handle_oom
 
 /* Windows doesn't have malloc_usable_size, but jemalloc has */
-#if defined(MOZ_MEMORY_WINDOWS)
+#if defined(MOZ_MEMORY_WINDOWS) || defined(__UCLIBC__)
 extern "C" size_t malloc_usable_size(const void *ptr);
 #endif