[PATCH] [Tsan] Fix the mmap_large.cc test to build on FreeBSD

Phabricator reviews at reviews.llvm.org
Mon Mar 23 12:43:49 PDT 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8545

Files:
  compiler-rt/trunk/test/tsan/mmap_large.cc

Index: compiler-rt/trunk/test/tsan/mmap_large.cc
===================================================================
--- compiler-rt/trunk/test/tsan/mmap_large.cc
+++ compiler-rt/trunk/test/tsan/mmap_large.cc
@@ -4,6 +4,13 @@
 #include <errno.h>
 #include <sys/mman.h>
 
+#if defined(__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
+
 int main() {
 #ifdef __x86_64__
   const size_t kLog2Size = 39;

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8545.22504.patch
Type: text/x-patch
Size: 563 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150323/2b7b1cf8/attachment.bin>


More information about the llvm-commits mailing list