[PATCH] fix sanitizer testing on FreeBSD
Pawel Worach
pawel.worach at gmail.com
Mon Aug 11 06:28:47 PDT 2014
Hi,
This patch fixes sanitizer testing on FreeBSD (tested on FreeBSD 10).
--
Pawel
-------------- next part --------------
Index: lib/sanitizer_common/sanitizer_platform_limits_posix.cc
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_posix.cc (revision 215296)
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.cc (working copy)
@@ -23,6 +23,10 @@
#include <limits.h>
#include <net/if.h>
#include <net/if_arp.h>
+#if SANITIZER_FREEBSD
+#define _WANT_RTENTRY
+#include <sys/mutex.h>
+#endif
#include <net/route.h>
#include <netdb.h>
#include <poll.h>
@@ -85,7 +89,6 @@
# include <sys/link_elf.h>
# include <netinet/ip_mroute.h>
# include <netinet/in.h>
-# include <netinet/ip_compat.h>
# include <net/ethernet.h>
# include <net/ppp_defs.h>
# include <glob.h>
@@ -639,8 +642,10 @@
#if SANITIZER_LINUX || SANITIZER_FREEBSD
unsigned IOCTL_MTIOCGET = MTIOCGET;
unsigned IOCTL_MTIOCTOP = MTIOCTOP;
+#if !SANITIZER_FREEBSD
unsigned IOCTL_SIOCADDRT = SIOCADDRT;
unsigned IOCTL_SIOCDELRT = SIOCDELRT;
+#endif
unsigned IOCTL_SNDCTL_DSP_GETBLKSIZE = SNDCTL_DSP_GETBLKSIZE;
unsigned IOCTL_SNDCTL_DSP_GETFMTS = SNDCTL_DSP_GETFMTS;
unsigned IOCTL_SNDCTL_DSP_NONBLOCK = SNDCTL_DSP_NONBLOCK;
More information about the llvm-commits
mailing list