From 8d59da7210d3afcc3566218c2a1b49cb8c03f2d3 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 10 Oct 2019 18:21:50 -0500 Subject: The __ANDROID_NDK__ symbol is missing from ndk-r20 but Dan Albert pointed out clang's __has_include(), and && shorts out the eval for gcc. --- lib/portability.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portability.h b/lib/portability.h index 69580da5..c2af278b 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -286,7 +286,7 @@ static inline int __android_log_write(int pri, const char *tag, const char *msg) #endif // libprocessgroup is an Android platform library not included in the NDK. -#if defined(__BIONIC__) && !defined(__ANDROID_NDK__) +#if defined(__BIONIC__) && __has_include() #include #else static inline int get_sched_policy(int tid, void *policy) {return 0;} -- cgit v1.2.3