[Toybox] [PATCH] Fix glibc build after 013876f067a11ebfcf47789921b376e7bf3bf5b8.

enh enh at google.com
Fri Sep 14 09:56:03 PDT 2018


/usr/include/unistd.h:626:15: error: conflicting types for 'confstr'
---
 lib/portability.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/portability.h b/lib/portability.h
index 0404c85..85ca42b 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -257,10 +257,13 @@ extern CODE prioritynames[], facilitynames[];
 #endif
 void xgetrandom(void *buf, unsigned len, unsigned flags);

-// android NDK doesn't have confstr
+// Android's bionic libc doesn't have confstr.
+#ifdef __BIONIC__
 #ifndef _CS_PATH
 #define _CS_PATH 0
 #define _CS_V7_ENV 1
 #include <string.h>
 static inline void confstr(int a, char *b, int c) {strcpy(b, a ?
"POSIXLY_CORRECT=1" : "/bin:/usr/bin");}
 #endif
+
+#endif
-- 
2.19.0.397.gdd90340f6a-goog
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-glibc-build-after-013876f067a11ebfcf47789921b376.patch
Type: text/x-patch
Size: 990 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20180914/bbab0ed5/attachment-0002.bin>


More information about the Toybox mailing list