aboutsummaryrefslogtreecommitdiffstats
path: root/testing/firefox/mallinfo.patch
blob: 5a8b7b7340e5e48cc8b1f01433d974e3bcee38bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
index 865e1b5430..9a00dafecb 100644
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -123,6 +123,7 @@ static MOZ_MUST_USE nsresult ResidentUniqueDistinguishedAmount(int64_t* aN) {
   return GetProcSelfSmapsPrivate(aN);
 }

+#ifdef __GLIBC__
 #  ifdef HAVE_MALLINFO
 #    define HAVE_SYSTEM_HEAP_REPORTER 1
 static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
@@ -142,6 +143,7 @@ static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
   return NS_OK;
 }
 #  endif
+#endif

 #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
     defined(__OpenBSD__) || defined(__FreeBSD_kernel__)