[scudo][standalone] Support __BIONIC__
Summary:
Some Android builds that we are interested in define `__BIONIC__`
but not `__ANDROID__`, so expand `SCUDO_ANDROID` to encompass those.
Reviewers: cferris, hctim, pcc, eugenis, morehouse
Subscribers: krytarowski, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D71772
GitOrigin-RevId: 0fd6f19025a79e331bdbaf35541a2e90a95faa71
diff --git a/platform.h b/platform.h
index a897a56..a4c2a0b 100644
--- a/platform.h
+++ b/platform.h
@@ -9,13 +9,17 @@
#ifndef SCUDO_PLATFORM_H_
#define SCUDO_PLATFORM_H_
+// Transitive includes of stdint.h specify some of the defines checked below.
+#include <stdint.h>
+
#if defined(__linux__)
#define SCUDO_LINUX 1
#else
#define SCUDO_LINUX 0
#endif
-#if defined(__ANDROID__)
+// See https://android.googlesource.com/platform/bionic/+/master/docs/defines.md
+#if defined(__BIONIC__)
#define SCUDO_ANDROID 1
#else
#define SCUDO_ANDROID 0