[compiler-rt] [netbsd] Define _RTLD_SOURCE to fix build
authorKamil Rytarowski <n54@gmx.com>
Wed, 25 Dec 2019 03:05:10 +0000 (04:05 +0100)
committerKamil Rytarowski <n54@gmx.com>
Wed, 25 Dec 2019 03:09:50 +0000 (04:09 +0100)
The TLS base (LWP private pointer) functions are namespaced and
hidden i.e. inside the _RTLD_SOURCE namespace.

compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp

index cd50371..56d4b71 100644 (file)
 #include "sanitizer_placement_new.h"
 #include "sanitizer_procmaps.h"
 
+#if SANITIZER_NETBSD
+#define _RTLD_SOURCE  // Fast LWP private pointer getters in ThreadSelfTlsTcb().
+#endif
+
 #include <dlfcn.h>  // for dlsym()
 #include <link.h>
 #include <pthread.h>