diff options
author | Ed Maste <emaste@freebsd.org> | 2014-10-14 21:08:35 +0000 |
---|---|---|
committer | Ed Maste <emaste@freebsd.org> | 2014-10-14 21:08:35 +0000 |
commit | 3ba162d2f9e955cb3ebf4a246e259f2c31ea4c8e (patch) | |
tree | f09b12b08ac74ecc448f7a5d4d9bb8f58fc529f3 /compiler-rt | |
parent | 498b223eec9a7060f897633e72b8e0a14f937024 (diff) | |
download | bcm5719-llvm-3ba162d2f9e955cb3ebf4a246e259f2c31ea4c8e.tar.gz bcm5719-llvm-3ba162d2f9e955cb3ebf4a246e259f2c31ea4c8e.zip |
Fix compiler-rt build on FreeBSD 10.1
We have to #define _WANT_RTENTRY to get struct rtentry, and add headers
that it depends on.
SIOCADDRT and SIOCDELRT also do not exist in FreeBSD 10.1 and were removed
in FreeBSD rev. 263203:
Garbage collect long time obsoleted (or never used) stuff from routing
API.
Differential Revision: http://reviews.llvm.org/D5703
llvm-svn: 219722
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc index 7fbb27f45bc..bbc1108dcdc 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc @@ -15,7 +15,11 @@ #include "sanitizer_platform.h" #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC - +#if SANITIZER_FREEBSD +#define _WANT_RTENTRY +#include <sys/param.h> +#include <sys/socketvar.h> +#endif #include <arpa/inet.h> #include <dirent.h> #include <errno.h> @@ -553,7 +557,9 @@ namespace __sanitizer { unsigned IOCTL_PPPIOCSMAXCID = PPPIOCSMAXCID; unsigned IOCTL_PPPIOCSMRU = PPPIOCSMRU; unsigned IOCTL_PPPIOCSXASYNCMAP = PPPIOCSXASYNCMAP; + unsigned IOCTL_SIOCADDRT = SIOCADDRT; unsigned IOCTL_SIOCDARP = SIOCDARP; + unsigned IOCTL_SIOCDELRT = SIOCDELRT; unsigned IOCTL_SIOCDRARP = SIOCDRARP; unsigned IOCTL_SIOCGARP = SIOCGARP; unsigned IOCTL_SIOCGIFENCAP = SIOCGIFENCAP; @@ -639,8 +645,6 @@ namespace __sanitizer { #if SANITIZER_LINUX || SANITIZER_FREEBSD unsigned IOCTL_MTIOCGET = MTIOCGET; unsigned IOCTL_MTIOCTOP = MTIOCTOP; - unsigned IOCTL_SIOCADDRT = SIOCADDRT; - unsigned IOCTL_SIOCDELRT = SIOCDELRT; unsigned IOCTL_SNDCTL_DSP_GETBLKSIZE = SNDCTL_DSP_GETBLKSIZE; unsigned IOCTL_SNDCTL_DSP_GETFMTS = SNDCTL_DSP_GETFMTS; unsigned IOCTL_SNDCTL_DSP_NONBLOCK = SNDCTL_DSP_NONBLOCK; |