[compiler-rt] r315917 - [scudo] Do not include sanitizer_posix.h if not on a Posix platform
Kostya Kortchinsky via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 16 10:06:13 PDT 2017
Author: cryptoad
Date: Mon Oct 16 10:06:13 2017
New Revision: 315917
URL: http://llvm.org/viewvc/llvm-project?rev=315917&view=rev
Log:
[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
Modified:
compiler-rt/trunk/lib/scudo/scudo_utils.cpp
Modified: compiler-rt/trunk/lib/scudo/scudo_utils.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/scudo/scudo_utils.cpp?rev=315917&r1=315916&r2=315917&view=diff
==============================================================================
--- compiler-rt/trunk/lib/scudo/scudo_utils.cpp (original)
+++ compiler-rt/trunk/lib/scudo/scudo_utils.cpp Mon Oct 16 10:06:13 2017
@@ -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
More information about the llvm-commits
mailing list