blob: 49325447e87cb1ac07aa08c28ad5754902fd2b1c [file] [log] [blame]
Andrew Geisslere34f8962021-04-15 15:53:51 -05001From 52c1586bff0ecb418ac21d6678f8963d70959f04 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Wed, 7 Apr 2021 11:14:13 +0800
Brad Bishopd7bf8c12018-02-25 22:55:05 -05004Subject: [PATCH] mallinfo() is glibc specific API mark it so
5
6Helps compiling with musl
7
Brad Bishopd7bf8c12018-02-25 22:55:05 -05008Upstream-Status: Pending
9
Andrew Geisslere34f8962021-04-15 15:53:51 -050010Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
12---
13 src/tbbmalloc_proxy/proxy.cpp | 2 ++
Brad Bishopd7bf8c12018-02-25 22:55:05 -050014 1 file changed, 2 insertions(+)
15
Andrew Geisslere34f8962021-04-15 15:53:51 -050016diff --git a/src/tbbmalloc_proxy/proxy.cpp b/src/tbbmalloc_proxy/proxy.cpp
17index f9942bf1..fe0dad89 100644
18--- a/src/tbbmalloc_proxy/proxy.cpp
19+++ b/src/tbbmalloc_proxy/proxy.cpp
20@@ -253,6 +253,7 @@ int mallopt(int /*param*/, int /*value*/) __THROW
Brad Bishopd7bf8c12018-02-25 22:55:05 -050021 return 1;
22 }
23
24+#ifdef __GLIBC__
25 struct mallinfo mallinfo() __THROW
26 {
27 struct mallinfo m;
Andrew Geisslere34f8962021-04-15 15:53:51 -050028@@ -260,6 +261,7 @@ struct mallinfo mallinfo() __THROW
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029
30 return m;
31 }
32+#endif
33
34 #if __ANDROID__
35 // Android doesn't have malloc_usable_size, provide it to be compatible
36--
Andrew Geisslere34f8962021-04-15 15:53:51 -0500372.17.1
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038