[PATCH] D38956: [scudo] Do not include sanitizer_posix.h if not on a Posix platform

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 08:51:15 PDT 2017


cryptoad created this revision.

Move the `sanitizer_posix.h` include within the `SANITIZER_ANDROID` `#if`,
otherwise this errors when built on non-Posix platforms (eg: Fuchsia).


https://reviews.llvm.org/D38956

Files:
  lib/scudo/scudo_utils.cpp


Index: lib/scudo/scudo_utils.cpp
===================================================================
--- lib/scudo/scudo_utils.cpp
+++ lib/scudo/scudo_utils.cpp
@@ -13,16 +13,16 @@
 
 #include "scudo_utils.h"
 
-#include "sanitizer_common/sanitizer_posix.h"
-
 #include <stdarg.h>
 #if defined(__x86_64__) || defined(__i386__)
 # include <cpuid.h>
 #endif
 #if defined(__arm__) || defined(__aarch64__)
 # 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38956.119164.patch
Type: text/x-patch
Size: 668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171016/b315eaee/attachment.bin>


More information about the llvm-commits mailing list