[compiler-rt] r236579 - [Msan] Fix the ifaddrs.cc test to build and pass on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Wed May 6 02:24:03 PDT 2015
Author: vkutuzov
Date: Wed May 6 04:24:02 2015
New Revision: 236579
URL: http://llvm.org/viewvc/llvm-project?rev=236579&view=rev
Log:
[Msan] Fix the ifaddrs.cc test to build and pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9457
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
compiler-rt/trunk/test/msan/ifaddrs.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h?rev=236579&r1=236578&r2=236579&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_interceptors.h Wed May 6 04:24:02 2015
@@ -222,7 +222,8 @@
#define SANITIZER_INTERCEPT_LISTXATTR SI_LINUX
#define SANITIZER_INTERCEPT_GETXATTR SI_LINUX
#define SANITIZER_INTERCEPT_GETRESID SI_LINUX
-#define SANITIZER_INTERCEPT_GETIFADDRS SI_LINUX_NOT_ANDROID || SI_MAC
+#define SANITIZER_INTERCEPT_GETIFADDRS \
+ SI_FREEBSD || SI_LINUX_NOT_ANDROID || SI_MAC
#define SANITIZER_INTERCEPT_IF_INDEXTONAME SI_LINUX_NOT_ANDROID || SI_MAC
#define SANITIZER_INTERCEPT_CAPGET SI_LINUX_NOT_ANDROID
#define SANITIZER_INTERCEPT_AEABI_MEM SI_LINUX && defined(__arm__)
Modified: compiler-rt/trunk/test/msan/ifaddrs.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/ifaddrs.cc?rev=236579&r1=236578&r2=236579&view=diff
==============================================================================
--- compiler-rt/trunk/test/msan/ifaddrs.cc (original)
+++ compiler-rt/trunk/test/msan/ifaddrs.cc Wed May 6 04:24:02 2015
@@ -10,6 +10,10 @@
#include <vector>
+#if defined(__FreeBSD__)
+#include <sys/socket.h> // To define 'struct sockaddr'.
+#endif
+
#include <sanitizer/msan_interface.h>
#define CHECK_AND_PUSH(addr, size) \
More information about the llvm-commits
mailing list