Add FreeBSD support to the address sanitizer's assign_large_valloc_to_global.cc test...
authorViktor Kutuzov <vkutuzov@accesssoftek.com>
Wed, 16 Jul 2014 10:14:01 +0000 (10:14 +0000)
committerViktor Kutuzov <vkutuzov@accesssoftek.com>
Wed, 16 Jul 2014 10:14:01 +0000 (10:14 +0000)
Differential Revision: http://reviews.llvm.org/D4525

llvm-svn: 213135

compiler-rt/test/asan/TestCases/Posix/assign_large_valloc_to_global.cc

index 15096e5e7fe50e192964812f452a07f46c513dd9..ad547ce0ce1b382586e38b67db6b859615a6fe13 100644 (file)
@@ -1,8 +1,9 @@
 // Make sure we don't report a leak nor hang.
 // RUN: %clangxx_asan -O3 %s -o %t && %run %t
 #include <stdlib.h>
-#ifndef __APPLE__
+#include <unistd.h>
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
 # include <malloc.h>
-#endif  // __APPLE__
+#endif  // !__APPLE__ && !__FreeBSD__
 int *p = (int*)valloc(1 << 20);
 int main() { }