diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-09-10 10:18:49 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-09-10 10:18:49 +0000 |
commit | 4a4719cc441e9c45031aca1a024b58fac5ed9edb (patch) | |
tree | 09aebf0330d28deb9b7340730f5938e74841272f /lib/sanitizer_common/sanitizer_allocator.cc | |
parent | 8d6e3f7d011970e35dadf831964260bcf6a4d8a9 (diff) |
[asan] There is no __libc_malloc on Android.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_allocator.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_allocator.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sanitizer_common/sanitizer_allocator.cc b/lib/sanitizer_common/sanitizer_allocator.cc index 45fcb230c..985f91a10 100644 --- a/lib/sanitizer_common/sanitizer_allocator.cc +++ b/lib/sanitizer_common/sanitizer_allocator.cc @@ -15,16 +15,16 @@ // FIXME: We should probably use more low-level allocator that would // mmap some pages and split them into chunks to fulfill requests. -#ifdef __linux__ +#if defined(__linux__) && !defined(__ANDROID__) extern "C" void *__libc_malloc(__sanitizer::uptr size); extern "C" void __libc_free(void *ptr); # define LIBC_MALLOC __libc_malloc # define LIBC_FREE __libc_free -#else // __linux__ +#else // __linux__ && !ANDROID # include <stdlib.h> # define LIBC_MALLOC malloc # define LIBC_FREE free -#endif // __linux__ +#endif // __linux__ && !ANDROID namespace __sanitizer { |