summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtwebengine/0003-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-07-13 00:41:52 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-07-14 23:56:51 +0200
commitd69be5de8c15bfe015c8a6ffb15eee3afb43b841 (patch)
tree225ef848492aa1aa1817d7702215ff413076abb1 /recipes-qt/qt5/qtwebengine/0003-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
parent92c634e9d584ebbf508b5ca4fea6d61d38373513 (diff)
downloadmeta-qt5-d69be5de8c15bfe015c8a6ffb15eee3afb43b841.tar.gz
qtwebengine: Fix build on musl
import needed chromium patches from meta-browser Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/0003-Avoid-mallinfo-APIs-on-non-glibc-linux.patch')
-rw-r--r--recipes-qt/qt5/qtwebengine/0003-Avoid-mallinfo-APIs-on-non-glibc-linux.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/0003-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/0003-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
new file mode 100644
index 00000000..2e0b1f00
--- /dev/null
+++ b/recipes-qt/qt5/qtwebengine/0003-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
@@ -0,0 +1,48 @@
1From 8defe37306b0d1548592afc12baa45f4aec5375c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 7 Jul 2017 14:09:06 -0700
4Subject: [PATCH 03/12] Avoid mallinfo() APIs on non-glibc/linux
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 base/trace_event/malloc_dump_provider.cc | 3 ++-
9 content/child/content_child_helpers.cc | 2 +-
10 2 files changed, 3 insertions(+), 2 deletions(-)
11
12diff --git a/base/trace_event/malloc_dump_provider.cc b/base/trace_event/malloc_dump_provider.cc
13index 3b1a933bc..a554d0373 100644
14--- a/base/trace_event/malloc_dump_provider.cc
15+++ b/base/trace_event/malloc_dump_provider.cc
16@@ -103,6 +103,7 @@ MallocDumpProvider::~MallocDumpProvider() {}
17 // the current process.
18 bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
19 ProcessMemoryDump* pmd) {
20+#if defined(__GLIBC__)
21 size_t total_virtual_size = 0;
22 size_t resident_size = 0;
23 size_t allocated_objects_size = 0;
24@@ -195,7 +196,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
25 pmd->DumpHeapUsage(metrics_by_context, overhead, "malloc");
26 }
27 tid_dumping_heap_ = kInvalidThreadId;
28-
29+#endif // __GLIBC__
30 return true;
31 }
32
33diff --git a/content/child/content_child_helpers.cc b/content/child/content_child_helpers.cc
34index 7ddeb4d16..b8c73b09c 100644
35--- a/content/child/content_child_helpers.cc
36+++ b/content/child/content_child_helpers.cc
37@@ -25,7 +25,7 @@ namespace content {
38 // though, this provides only a partial and misleading value.
39 // Unfortunately some telemetry benchmark rely on it and these need to
40 // be refactored before getting rid of this. See crbug.com/581365 .
41-#if defined(OS_LINUX) || defined(OS_ANDROID)
42+#if defined(__GLIBC__) || defined(OS_ANDROID)
43 size_t GetMemoryUsageKB() {
44 struct mallinfo minfo = mallinfo();
45 uint64_t mem_usage =
46--
472.13.2
48