diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2017-10-16 17:06:13 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2017-10-16 17:06:13 +0000 |
commit | c7837d890a8bb1fff24931552dd0d2f10cb82ae1 (patch) | |
tree | 047eea9561a1f8ed5a9c036a0129729587f0b5ce | |
parent | 2323ab971abf58ef526fef84eeb8b9fc8b83e2b2 (diff) |
[scudo] Do not include sanitizer_posix.h if not on a Posix platform
Summary:
Move the `sanitizer_posix.h` include within the `SANITIZER_ANDROID` `#if`,
otherwise this errors when built on non-Posix platforms (eg: Fuchsia).
Reviewers: alekseyshl
Reviewed By: alekseyshl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D38956
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315917 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/scudo/scudo_utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/scudo/scudo_utils.cpp b/lib/scudo/scudo_utils.cpp index 71d1b2e1b..093eafe8e 100644 --- a/lib/scudo/scudo_utils.cpp +++ b/lib/scudo/scudo_utils.cpp @@ -13,8 +13,6 @@ #include "scudo_utils.h" -#include "sanitizer_common/sanitizer_posix.h" - #include <stdarg.h> #if defined(__x86_64__) || defined(__i386__) # include <cpuid.h> @@ -23,6 +21,8 @@ # if SANITIZER_ANDROID && __ANDROID_API__ < 18 // getauxval() was introduced with API level 18 on Android. Emulate it using // /proc/self/auxv for lower API levels. +# include "sanitizer_common/sanitizer_posix.h" + # include <fcntl.h> # define AT_HWCAP 16 |