From 349e0626953528454f2566bd56e6565ad5a4fd82 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 11 Feb 2015 19:48:27 +0000 Subject: [PATCH] [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 --- compiler-rt/lib/sanitizer_common/sanitizer_posix.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc index 6cb51ef..5bc41c2 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc @@ -30,6 +30,13 @@ #include #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 -- 2.7.4