From 288321ac86375450f5f57990201a56c385936323 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 8 Sep 2018 15:42:02 -0500 Subject: Tweaks to make building with Android NDK's llvm happier. --- lib/portability.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/portability.h') diff --git a/lib/portability.h b/lib/portability.h index 39e61810..0404c85e 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -256,3 +256,11 @@ extern CODE prioritynames[], facilitynames[]; #include #endif void xgetrandom(void *buf, unsigned len, unsigned flags); + +// android NDK doesn't have confstr +#ifndef _CS_PATH +#define _CS_PATH 0 +#define _CS_V7_ENV 1 +#include +static inline void confstr(int a, char *b, int c) {strcpy(b, a ? "POSIXLY_CORRECT=1" : "/bin:/usr/bin");} +#endif -- cgit v1.2.3