3c66ac07a0
- Switch to cmake-package - Drop DO_ITT_NOTIFY which is only used in example and test - license file has been renamed to LICENSE.txt - Add upstream patches to fix musl build https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-threading-building-blocks-release-notes.html Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From 3a7f96db56cc9821055cbc769d3065db86b8b4c9 Mon Sep 17 00:00:00 2001
|
|
From: Julien Voisin <jvoisin@users.noreply.github.com>
|
|
Date: Mon, 7 Feb 2022 07:56:15 +0100
|
|
Subject: [PATCH] mallinfo is only defined on glibc and android (#764)
|
|
|
|
It currently prevents compilation under musl:
|
|
|
|
```
|
|
[ 90%] Building CXX object src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/proxy.cpp.o
|
|
/__w/mimalloc-bench/mimalloc-bench/extern/tbb/src/tbbmalloc_proxy/proxy.cpp:263:26: error: return type 'struct mallinfo' is incomplete
|
|
263 | struct mallinfo mallinfo() __THROW
|
|
| ^
|
|
compilation terminated due to -Wfatal-errors.
|
|
``
|
|
|
|
[Retrieved from:
|
|
https://github.com/oneapi-src/oneTBB/commit/3a7f96db56cc9821055cbc769d3065db86b8b4c9]
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
---
|
|
src/tbbmalloc_proxy/proxy.cpp | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/src/tbbmalloc_proxy/proxy.cpp b/src/tbbmalloc_proxy/proxy.cpp
|
|
index e58e55e0b..23b9c19c1 100644
|
|
--- a/src/tbbmalloc_proxy/proxy.cpp
|
|
+++ b/src/tbbmalloc_proxy/proxy.cpp
|
|
@@ -260,6 +260,7 @@ int mallopt(int /*param*/, int /*value*/) __THROW
|
|
return 1;
|
|
}
|
|
|
|
+#if defined(__GLIBC__) || defined(__ANDROID__)
|
|
struct mallinfo mallinfo() __THROW
|
|
{
|
|
struct mallinfo m;
|
|
@@ -267,6 +268,7 @@ struct mallinfo mallinfo() __THROW
|
|
|
|
return m;
|
|
}
|
|
+#endif
|
|
|
|
#if __ANDROID__
|
|
// Android doesn't have malloc_usable_size, provide it to be compatible
|