blob: 355cf2e0bb461e039e94fd507ffd02b44919062b [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From a7289eeff4ac9e3ca2d2289672c923518433124c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 8 Dec 2021 09:26:58 -0800
4Subject: [PATCH] Musl/linux can not use RTLD_DEEPBIND
5
6Exclude non-glibc linux systems along with android
7Fixes
8src/tbb/dynamic_link.cpp:417:29: error: use
9 of undeclared identifier 'RTLD_DEEPBIND' | flags = flags | RTLD_DEEPBIND;
10| ^
11
12Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/684]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 src/tbb/dynamic_link.cpp | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/src/tbb/dynamic_link.cpp b/src/tbb/dynamic_link.cpp
19index 12f35cfd..942c1c64 100644
20--- a/src/tbb/dynamic_link.cpp
21+++ b/src/tbb/dynamic_link.cpp
22@@ -413,7 +413,7 @@ namespace r1 {
23 int flags = RTLD_NOW;
24 if (local_binding) {
25 flags = flags | RTLD_LOCAL;
26-#if __linux__ && !__ANDROID__ && !__TBB_USE_SANITIZERS
27+#if (__linux__ && __GLIBC__) && !__TBB_USE_SANITIZERS
28 flags = flags | RTLD_DEEPBIND;
29 #endif
30 } else {
31--
322.34.1
33