From 1f73aace0feb60ce1b200e7bf8e8339c1e2994fa Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 7 Oct 2018 19:55:11 -0500 Subject: Fix non-android ps build. --- lib/portability.h | 9 ++++----- 1 file 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 +#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 -#endif #endif #ifndef SYSLOG_NAMES -- cgit v1.2.3