summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dimitry@andric.com>2015-02-11 19:48:27 +0000
committerDimitry Andric <dimitry@andric.com>2015-02-11 19:48:27 +0000
commit349e0626953528454f2566bd56e6565ad5a4fd82 (patch)
treeea363da7dab3e7bebaf3a276b3b4979503bd065c
parent05df16d809d5a128299775e4b06007aaae68fbbf (diff)
downloadbcm5719-llvm-349e0626953528454f2566bd56e6565ad5a4fd82.tar.gz
bcm5719-llvm-349e0626953528454f2566bd56e6565ad5a4fd82.zip
[Sanitizers] The MAP_NORESERVE define has been removed in FreeBSD 11.x,
and even before that, it was never implemented. Just define it to zero instead, so compiler-rt can compile on FreeBSD 11 and later. Differential Revision: http://reviews.llvm.org/D7485 llvm-svn: 228871
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_posix.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
index 6cb51efce2d..5bc41c2580f 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
@@ -30,6 +30,13 @@
#include <sys/personality.h>
#endif
+#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 {
// ------------- sanitizer_common.h
OpenPOWER on IntegriCloud