aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/portability.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/portability.h b/lib/portability.h
index 1f5fbf6f..bc48deb9 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -268,13 +268,12 @@ static inline int __system_property_set(const char *key, const char *value)
}
#endif
-#if defined(__BIONIC__)
-#if defined(__ANDROID_NDK__)
+// libcutils is in AOSP but not Android NDK r18
+#if defined(__BIONIC__) && !defined(__ANDROID_NDK__)
+#include <cutils/sched_policy.h>
+#else
static inline int get_sched_policy(int tid, void *policy) {return 0;}
static inline char *get_sched_policy_name(int policy) {return "unknown";}
-#else
-#include <cutils/sched_policy.h>
-#endif
#endif
#ifndef SYSLOG_NAMES