summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/asan_malloc_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/asan/asan_malloc_linux.cc')
-rw-r--r--compiler-rt/lib/asan/asan_malloc_linux.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/asan_malloc_linux.cc b/compiler-rt/lib/asan/asan_malloc_linux.cc
index 1b96714536c..9dbc7a127fc 100644
--- a/compiler-rt/lib/asan/asan_malloc_linux.cc
+++ b/compiler-rt/lib/asan/asan_malloc_linux.cc
@@ -13,6 +13,7 @@
// We simply define functions like malloc, free, realloc, etc.
// They will replace the corresponding libc functions automagically.
//===----------------------------------------------------------------------===//
+#ifdef __linux__
#include "asan_allocator.h"
#include "asan_interceptors.h"
@@ -137,3 +138,5 @@ void *pvalloc(size_t size) {
return asan_pvalloc(size, &stack);
}
} // extern "C"
+
+#endif // __linux__
OpenPOWER on IntegriCloud