diff options
author | Rob Landley <rob@landley.net> | 2018-10-07 19:55:11 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-10-07 19:55:11 -0500 |
commit | 1f73aace0feb60ce1b200e7bf8e8339c1e2994fa (patch) | |
tree | 6fdcfbafb815bce18e9a9596e081036bcbc31841 /lib | |
parent | ace221343e8c8cacfc853006edfe227a85f555b3 (diff) | |
download | toybox-1f73aace0feb60ce1b200e7bf8e8339c1e2994fa.tar.gz |
Fix non-android ps build.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/portability.h | 9 |
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 |