contrib/firefox/0011-musl-Only-use-system-heap-reporter-with-glibc.patch
2022-09-19 22:37:26 +10:00

34 lines
1.1 KiB
Diff

From 68dd87a3dc06cf59396dccc3e031761f7237656e Mon Sep 17 00:00:00 2001
From: "Jory A. Pratt" <anarchy@gentoo.org>
Date: Mon, 6 Apr 2020 20:09:26 +0200
Subject: [PATCH 12/30] musl: Only use system heap reporter with glibc
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
xpcom/base/nsMemoryReporterManager.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
index bd4629c785..b513f81216 100644
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -647,6 +647,7 @@ static bool InSharedRegion(mach_vm_address_t aAddr, cpu_type_t aType) {
return NS_OK;
}
+#ifdef __GLIBC__
# define HAVE_SYSTEM_HEAP_REPORTER 1
// Windows can have multiple separate heaps, but we should not touch non-default
// heaps because they may be destroyed at anytime while we hold a handle. So we
@@ -679,6 +680,7 @@ static bool InSharedRegion(mach_vm_address_t aAddr, cpu_type_t aType) {
*aSizeOut = heapSize;
return NS_OK;
}
+#endif
struct SegmentKind {
DWORD mState;
--
2.34.1