blob: 9af37ebc6491a2a005478da694462bc93cf6c4db [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 -050016--- a/src/tbbmalloc_proxy/proxy.cpp
17+++ b/src/tbbmalloc_proxy/proxy.cpp
Andrew Geissler595f6302022-01-24 19:11:47 +000018@@ -260,6 +260,7 @@ int mallopt(int /*param*/, int /*value*/
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019 return 1;
20 }
21
22+#ifdef __GLIBC__
23 struct mallinfo mallinfo() __THROW
24 {
25 struct mallinfo m;
Andrew Geissler595f6302022-01-24 19:11:47 +000026@@ -267,6 +268,7 @@ struct mallinfo mallinfo() __THROW
Brad Bishopd7bf8c12018-02-25 22:55:05 -050027
28 return m;
29 }
30+#endif
31
32 #if __ANDROID__
33 // Android doesn't have malloc_usable_size, provide it to be compatible