aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-10-10 18:21:50 -0500
committerRob Landley <rob@landley.net>2019-10-10 18:21:50 -0500
commit8d59da7210d3afcc3566218c2a1b49cb8c03f2d3 (patch)
treefb3f6d1735ecfa684c4df011d4369431e28bd6c8
parent068b12adfb4577b8e732f56e979017cd690baec5 (diff)
downloadtoybox-8d59da7210d3afcc3566218c2a1b49cb8c03f2d3.tar.gz
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.
-rw-r--r--lib/portability.h2
1 files changed, 1 insertions, 1 deletions
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(<processgroup/sched_policy.h>)
#include <processgroup/sched_policy.h>
#else
static inline int get_sched_policy(int tid, void *policy) {return 0;}