[PATCH] Define MAP_NORESERVE to zero for FreeBSD
Dimitry Andric
dimitry at andric.com
Sat Feb 7 13:49:22 PST 2015
Hi kcc, kutuzov.viktor.84,
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.
http://reviews.llvm.org/D7485
Files:
lib/sanitizer_common/sanitizer_posix.cc
Index: lib/sanitizer_common/sanitizer_posix.cc
===================================================================
--- lib/sanitizer_common/sanitizer_posix.cc
+++ 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
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7485.19538.patch
Type: text/x-patch
Size: 550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150207/7d643471/attachment.bin>
More information about the cfe-commits
mailing list