summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2014-05-14 09:21:22 +0000
committerKostya Serebryany <kcc@google.com>2014-05-14 09:21:22 +0000
commitd5e1091c736e2291f7d1a6f1098c59533b2a22cf (patch)
tree090467e77b024e3865fcb07ea0dc68c08d602b1c
parente6de9e39a8ac60a213538ea51e5ca07f517bfc5a (diff)
downloadbcm5719-llvm-d5e1091c736e2291f7d1a6f1098c59533b2a22cf.tar.gz
bcm5719-llvm-d5e1091c736e2291f7d1a6f1098c59533b2a22cf.zip
[asan] tyring to fix the Android build
llvm-svn: 208763
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_posix.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
index 06b05e8920b..2cd2a7c4ddb 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc
@@ -24,6 +24,9 @@
#if SANITIZER_LINUX
#include <sys/utsname.h>
+#endif
+
+#if SANITIZER_LINUX && !SANITIZER_ANDROID
#include <sys/personality.h>
#endif
@@ -52,6 +55,7 @@ static uptr GetKernelAreaSize() {
return 0;
}
+#if !SANITIZER_ANDROID
// Even if nothing is mapped, top Gb may still be accessible
// if we are running on 64-bit kernel.
// Uname may report misleading results if personality type
@@ -62,6 +66,7 @@ static uptr GetKernelAreaSize() {
&& uname(&uname_info) == 0
&& internal_strstr(uname_info.machine, "64"))
return 0;
+#endif // SANITIZER_ANDROID
// Top gigabyte is reserved for kernel.
return gbyte;
OpenPOWER on IntegriCloud