]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libsanitizer/interception/interception_linux.cc
libsanitizer merge from upstream r191666
[thirdparty/gcc.git] / libsanitizer / interception / interception_linux.cc
index 4929a7fce49a9f145fab171cbe71365ad9e51b61..0a8df474ab49752bbd616cddab43c04598f96b31 100644 (file)
@@ -13,7 +13,6 @@
 #ifdef __linux__
 #include "interception.h"
 
-#include <stddef.h>  // for NULL
 #include <dlfcn.h>   // for dlsym
 
 namespace __interception {
@@ -22,6 +21,13 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
   *func_addr = (uptr)dlsym(RTLD_NEXT, func_name);
   return real == wrapper;
 }
+
+#if !defined(__ANDROID__)  // android does not have dlvsym
+void *GetFuncAddrVer(const char *func_name, const char *ver) {
+  return dlvsym(RTLD_NEXT, func_name, ver);
+}
+#endif  // !defined(__ANDROID__)
+
 }  // namespace __interception