[compiler-rt] r233001 - [Tsan] Fix the mmap_large.cc test to build on FreeBSD

Viktor Kutuzov vkutuzov at accesssoftek.com
Mon Mar 23 12:40:59 PDT 2015


Author: vkutuzov
Date: Mon Mar 23 14:40:59 2015
New Revision: 233001

URL: http://llvm.org/viewvc/llvm-project?rev=233001&view=rev
Log:
[Tsan] Fix the mmap_large.cc test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D8545

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

Modified: compiler-rt/trunk/test/tsan/mmap_large.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/mmap_large.cc?rev=233001&r1=233000&r2=233001&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/mmap_large.cc (original)
+++ compiler-rt/trunk/test/tsan/mmap_large.cc Mon Mar 23 14:40:59 2015
@@ -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;





More information about the llvm-commits mailing list