summaryrefslogtreecommitdiff
path: root/www/seamonkey/files/patch-bug778056
blob: 468c103e4bf52787d72cfb0e9df7b1ac21ba374f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- mozilla/memory/mozalloc/mozalloc.cpp~
+++ mozilla/memory/mozalloc/mozalloc.cpp
@@ -19,6 +19,9 @@
 #if defined(XP_UNIX)
 #  include <unistd.h>           // for valloc on *BSD
 #endif //if defined(XP_UNIX)
+#if defined(__FreeBSD__)
+#  include <malloc_np.h>        // for malloc_usable_size
+#endif // if defined(__FreeBSD__)
 
 #if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
 #  define MOZALLOC_EXPORT __declspec(dllexport)
@@ -210,7 +213,7 @@ moz_malloc_usable_size(void *ptr)
 
 #if defined(XP_MACOSX)
     return malloc_size(ptr);
-#elif defined(MOZ_MEMORY) || (defined(XP_LINUX) && !defined(ANDROID))
+#elif defined(MOZ_MEMORY) || (defined(XP_LINUX) && !defined(ANDROID)) || defined(__FreeBSD__)
     // Android bionic libc doesn't have malloc_usable_size.
     return malloc_usable_size(ptr);
 #elif defined(XP_WIN)