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

Viktor Kutuzov vkutuzov at accesssoftek.com
Thu Feb 12 05:45:05 PST 2015


Hi kcc, samsonov,

This patch completes the changes in D7485.

http://reviews.llvm.org/D7586

Files:
  test/asan/TestCases/dlclose-test.cc

Index: test/asan/TestCases/dlclose-test.cc
===================================================================
--- test/asan/TestCases/dlclose-test.cc
+++ 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.19821.patch
Type: text/x-patch
Size: 505 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150212/496cf3cd/attachment.bin>


More information about the llvm-commits mailing list