diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-06-04 00:42:15 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-06-04 00:42:15 +0000 |
commit | 1b3d46ec30dde3504f46514abdc54564691d4564 (patch) | |
tree | b3cf3e8bf0717237f69403b958e3321977d494bd /compiler-rt | |
parent | 90e8e2c586e026524e6496205100d66bce33c592 (diff) | |
download | bcm5719-llvm-1b3d46ec30dde3504f46514abdc54564691d4564.tar.gz bcm5719-llvm-1b3d46ec30dde3504f46514abdc54564691d4564.zip |
[asan] Fix undefined MAP_NORESERVE on FreeBSD.
llvm-svn: 238995
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc index b36a0fafbdf..3f0a4f453cb 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc @@ -35,6 +35,13 @@ #include <sys/stat.h> #include <unistd.h> +#if SANITIZER_FREEBSD +// The MAP_NORESERVE define has been removed in FreeBSD 11.x, and even before +// that, it was never implemented. So just define it to zero. +#undef MAP_NORESERVE +#define MAP_NORESERVE 0 +#endif + namespace __sanitizer { u32 GetUid() { |