blob: 0bf71919aea121c52492c4511d87484ddf75ccaa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
RTLD_DEEPBIND isn't available on non-Linux
core/os_interface/linux/os_library_linux.cpp: In constructor 'NEO::Linux::OsLibrary::OsLibrary(const string&)':
core/os_interface/linux/os_library_linux.cpp:35:49: error: 'RTLD_DEEPBIND' was not declared in this scope
35 | constexpr auto dlopenFlag = RTLD_LAZY | RTLD_DEEPBIND;
| ^~~~~~~~~~~~~
--- shared/source/os_interface/linux/os_library_linux.cpp.orig 2020-02-28 16:16:42 UTC
+++ shared/source/os_interface/linux/os_library_linux.cpp
@@ -29,7 +29,7 @@ OsLibrary::OsLibrary(const std::string &name) {
if (name.empty()) {
this->handle = dlopen(0, RTLD_LAZY);
} else {
-#ifdef SANITIZER_BUILD
+#if defined(SANITIZER_BUILD) || !defined(__linux__)
constexpr auto dlopenFlag = RTLD_LAZY;
#else
constexpr auto dlopenFlag = RTLD_LAZY | RTLD_DEEPBIND;
|