[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
This commit is contained in:
Kostya Kortchinsky
2019-12-20 08:23:57 -08:00
parent dc03b960d0
commit 0fd6f19025

View File

@@ -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