From 6c349352920e4321308e650ce8ec1852e64429ef Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Fri, 14 Feb 2014 15:02:36 +0000 Subject: [PATCH] [asan] Replace posix_memalign with memalign in test. Android does not provide posix_memalign. llvm-svn: 201420 --- compiler-rt/test/asan/TestCases/large_allocator_unpoisons_on_free.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler-rt/test/asan/TestCases/large_allocator_unpoisons_on_free.cc b/compiler-rt/test/asan/TestCases/large_allocator_unpoisons_on_free.cc index d1499d2..f95cc44 100644 --- a/compiler-rt/test/asan/TestCases/large_allocator_unpoisons_on_free.cc +++ b/compiler-rt/test/asan/TestCases/large_allocator_unpoisons_on_free.cc @@ -5,14 +5,13 @@ // RUN: ASAN_OPTIONS=quarantine_size=1 %t #include -#include +#include #include #include int main() { const int kPageSize = 4096; - void *p = NULL; - posix_memalign(&p, kPageSize, 1024 * 1024); + void *p = memalign(kPageSize, 1024 * 1024); free(p); char *q = (char *)mmap(p, kPageSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_FIXED, 0, 0); -- 2.7.4