Skip to content

Commit

Permalink
Fix static Android NDK build.
Browse files Browse the repository at this point in the history
  • Loading branch information
landley committed Oct 10, 2018
1 parent 9492c7f commit b123b11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/portability.h
Expand Up @@ -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[];
Expand Down

0 comments on commit b123b11

Please sign in to comment.