aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-qt/qtwebengine/files/qtwebengine-5.6.0-musl-mallinfo.patch')
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.6.0-musl-mallinfo.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.6.0-musl-mallinfo.patch b/dev-qt/qtwebengine/files/qtwebengine-5.6.0-musl-mallinfo.patch
new file mode 100644
index 0000000..170064b
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.6.0-musl-mallinfo.patch
@@ -0,0 +1,32 @@
+In musl libc there is no struct mallinfo and no function mallinf()
+
+--- qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2015-06-05 04:52:18.502230985 +0200
++++ qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2015-06-05 04:52:06.712231020 +0200
+@@ -15,7 +15,7 @@
+
+ namespace content {
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_ANDROID)
+ size_t GetMemoryUsageKB() {
+ struct mallinfo minfo = mallinfo();
+ uint64_t mem_usage =
+--- qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2016-03-03 15:48:36.000000000 +0100
++++ qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2016-03-17 05:09:41.409425897 +0100
+@@ -29,6 +29,7 @@
+ // Called at trace dump point time. Creates a snapshot the memory counters for
+ // the current process.
+ bool MallocDumpProvider::OnMemoryDump(ProcessMemoryDump* pmd) {
++#if defined(__GLIBC__)
+ struct mallinfo info = mallinfo();
+ DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
+
+@@ -46,7 +47,7 @@
+ MemoryAllocatorDump* inner_dump = pmd->CreateAllocatorDump(kAllocatedObjects);
+ inner_dump->AddScalar(MemoryAllocatorDump::kNameSize,
+ MemoryAllocatorDump::kUnitsBytes, info.uordblks);
+-
++#endif
+ return true;
+ }
+