[Msan] Fix the ifaddrs.cc test to build and pass on FreeBSD

Differential Revision: http://reviews.llvm.org/D9457

llvm-svn: 236579
This commit is contained in:
Viktor Kutuzov 2015-05-06 09:24:02 +00:00
parent 62c78f5474
commit d04e0d7292
2 changed files with 6 additions and 1 deletions

View File

@ -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__)

View File

@ -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) \