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 | 6f66ed1329bfa215e24169add3f23a032e9aadfd (patch) | |
| tree | 3acd1cadf6c8772cc0d7e8ad54a09947b8e37587 /compiler-rt | |
| parent | 6eb13990889378e9b400a9fc8a0c9612efcae551 (diff) | |
| download | bcm5719-llvm-6f66ed1329bfa215e24169add3f23a032e9aadfd.tar.gz bcm5719-llvm-6f66ed1329bfa215e24169add3f23a032e9aadfd.zip | |
[asan] There is no __libc_malloc on Android.
llvm-svn: 163498
Diffstat (limited to 'compiler-rt')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc index 45fcb230c79..985f91a103e 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc +++ b/compiler-rt/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 { |

