aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-10-10 18:18:59 -0500
committerRob Landley <rob@landley.net>2018-10-10 18:18:59 -0500
commitb123b11608260218df29acdff8016908e7d213f2 (patch)
tree3374ff6f3213aebbce070e7424dcd949fdff5661 /lib
parent9492c7fce507cd5cd5172d6e2bf2b86573198806 (diff)
downloadtoybox-b123b11608260218df29acdff8016908e7d213f2.tar.gz
Fix static Android NDK build.
Diffstat (limited to 'lib')
-rw-r--r--lib/portability.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h
index bc48deb9..d851a703 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -276,6 +276,12 @@ static inline int get_sched_policy(int tid, void *policy) {return 0;}
static inline char *get_sched_policy_name(int policy) {return "unknown";}
#endif
+// The NDK has liblog.so but not liblog.c for static builds, and it's
+// just a stub version anyway.
+#ifdef __ANDROID_NDK__
+int __android_log_write(int prio, const char* tag, const char* text) {return 0;}
+#endif
+
#ifndef SYSLOG_NAMES
typedef struct {char *c_name; int c_val;} CODE;
extern CODE prioritynames[], facilitynames[];