Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | From a7289eeff4ac9e3ca2d2289672c923518433124c Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Wed, 8 Dec 2021 09:26:58 -0800 |
| 4 | Subject: [PATCH] Musl/linux can not use RTLD_DEEPBIND |
| 5 | |
| 6 | Exclude non-glibc linux systems along with android |
| 7 | Fixes |
| 8 | src/tbb/dynamic_link.cpp:417:29: error: use |
| 9 | of undeclared identifier 'RTLD_DEEPBIND' | flags = flags | RTLD_DEEPBIND; |
| 10 | | ^ |
| 11 | |
| 12 | Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/684] |
| 13 | Signed-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 | |
| 18 | diff --git a/src/tbb/dynamic_link.cpp b/src/tbb/dynamic_link.cpp |
| 19 | index 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 | -- |
| 32 | 2.34.1 |
| 33 | |