aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/portability.h2
-rwxr-xr-xscripts/genconfig.sh6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/portability.h b/lib/portability.h
index e0dd914e..f1dcc523 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -274,7 +274,7 @@ pid_t xfork(void);
//#define strncpy(...) @@strncpyisbadmmkay@@
//#define strncat(...) @@strncatisbadmmkay@@
-#ifdef __ANDROID__
+#if CFG_TOYBOX_ANDROID_SCHEDPOLICY
#include <cutils/sched_policy.h>
#else
static inline int get_sched_policy(int tid, void *policy) {return 0;}
diff --git a/scripts/genconfig.sh b/scripts/genconfig.sh
index 8d5f98ca..c16974d7 100755
--- a/scripts/genconfig.sh
+++ b/scripts/genconfig.sh
@@ -84,6 +84,12 @@ EOF
#endif
EOF
+ probesymbol TOYBOX_ANDROID_SCHEDPOLICY << EOF
+ #include <cutils/sched_policy.h>
+
+ int main(int argc,char *argv[]) { get_sched_policy_name(0); }
+EOF
+
# nommu support
probesymbol TOYBOX_FORK << EOF
#include <unistd.h>