From b123b11608260218df29acdff8016908e7d213f2 Mon Sep 17 00:00:00 2001
From: Rob Landley <rob@landley.net>
Date: Wed, 10 Oct 2018 18:18:59 -0500
Subject: Fix static Android NDK build.

---
 lib/portability.h | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'lib')

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[];
-- 
cgit v1.2.3