From 5cac8b5fffa4ebf5f0090456c9e0cbf43827242a Mon Sep 17 00:00:00 2001
|
From: Naveen Saini <naveen.kumar.saini@intel.com>
|
Date: Wed, 7 Apr 2021 11:32:52 +0800
|
Subject: [PATCH] src/tbbmalloc/proxy.cpp: __GLIBC_PREREQ is not defined on
|
musl
|
|
Do not call __GLIBC_PREREQ if it is not defined otherwise build will
|
fail on musl
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/203]
|
|
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
|
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
---
|
src/tbbmalloc_proxy/proxy.cpp | 6 ++++--
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
diff --git a/src/tbbmalloc_proxy/proxy.cpp b/src/tbbmalloc_proxy/proxy.cpp
|
index fe0dad89..93e68049 100644
|
--- a/src/tbbmalloc_proxy/proxy.cpp
|
+++ b/src/tbbmalloc_proxy/proxy.cpp
|
@@ -24,7 +24,8 @@
|
// of aligned_alloc as required by new C++ standard, this makes it hard to
|
// redefine aligned_alloc here. However, running on systems with new libc
|
// version, it still needs it to be redefined, thus tricking system headers
|
-#if defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC
|
+#if defined(__GLIBC_PREREQ)
|
+#if !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC
|
// tell <cstdlib> that there is no aligned_alloc
|
#undef _GLIBCXX_HAVE_ALIGNED_ALLOC
|
// trick <stdlib.h> to define another symbol instead
|
@@ -32,7 +33,8 @@
|
// Fix the state and undefine the trick
|
#include <cstdlib>
|
#undef aligned_alloc
|
-#endif // defined(__GLIBC_PREREQ)&&!__GLIBC_PREREQ(2, 16)&&_GLIBCXX_HAVE_ALIGNED_ALLOC
|
+#endif // defined(__GLIBC_PREREQ)
|
+#endif // !__GLIBC_PREREQ(2, 16)&&_GLIBCXX_HAVE_ALIGNED_ALLOC
|
#endif // __linux__ && !__ANDROID__
|
|
#include "proxy.h"
|
--
|
2.17.1
|