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

Phabricator reviews at reviews.llvm.org
Mon Feb 16 05:13:12 PST 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7586

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

Index: compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc
===================================================================
--- compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc
+++ compiler-rt/trunk/test/asan/TestCases/dlclose-test.cc
@@ -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)();

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7586.20019.patch
Type: text/x-patch
Size: 559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150216/be185864/attachment.bin>


More information about the llvm-commits mailing list