[Sanitizer] Workaround for a compiler warning - ISO C++ forbids casting pointer-to-function to pointer-to-object, so we use cast via integral type
llvm-svn: 161168
diff --git a/compiler-rt/lib/interception/interception_linux.cc b/compiler-rt/lib/interception/interception_linux.cc
index 37e5933..009098f 100644
--- a/compiler-rt/lib/interception/interception_linux.cc
+++ b/compiler-rt/lib/interception/interception_linux.cc
@@ -13,14 +13,15 @@
//===----------------------------------------------------------------------===//
#ifdef __linux__
+#include "interception.h"
#include <stddef.h> // for NULL
#include <dlfcn.h> // for dlsym
namespace __interception {
-bool GetRealFunctionAddress(const char *func_name, void **func_addr,
- void *real, void *wrapper) {
- *func_addr = dlsym(RTLD_NEXT, func_name);
+bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
+ uptr real, uptr wrapper) {
+ *func_addr = (uptr)dlsym(RTLD_NEXT, func_name);
return real == wrapper;
}
} // namespace __interception