[compiler-rt] r229381 - [Asan] Fix the dlclose-test.cc unit test to build on FreeBSD 11

Viktor Kutuzov vkutuzov at accesssoftek.com
Mon Feb 16 05:11:09 PST 2015


Author: vkutuzov
Date: Mon Feb 16 07:11:09 2015
New Revision: 229381

URL: http://llvm.org/viewvc/llvm-project?rev=229381&view=rev
Log:
[Asan] Fix the dlclose-test.cc unit test to build on FreeBSD 11
Differential Revision: http://reviews.llvm.org/D7586

Modified:
    compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc

Modified: compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc?rev=229381&r1=229380&r2=229381&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc Mon Feb 16 07:11:09 2015
@@ -33,6 +33,13 @@
 
 #include <string>
 
+#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
+
 using std::string;
 
 typedef int *(fun_t)();





More information about the llvm-commits mailing list