actually, ignore the first patch. this one is cleaner: diff --git a/lib/portability.h b/lib/portability.h index 0404c85..8e1049f 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -257,8 +257,8 @@ extern CODE prioritynames[], facilitynames[]; #endif void xgetrandom(void *buf, unsigned len, unsigned flags);
-// android NDK doesn't have confstr -#ifndef _CS_PATH +// Android's bionic libc doesn't have confstr. +#ifdef __BIONIC__ #define _CS_PATH 0 #define _CS_V7_ENV 1 #include <string.h> -- 2.19.0.397.gdd90340f6a-goog On Fri, Sep 14, 2018 at 9:58 AM enh <[email protected]> wrote: > > (note also that that value of $PATH doesn't make sense for Android. is > there a reason you didn't use _PATH_DEFPATH?) > On Fri, Sep 14, 2018 at 9:56 AM enh <[email protected]> wrote: > > > > /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
From e791388c923111c8e246ad867f5f82d10d9e00e1 Mon Sep 17 00:00:00 2001 From: Elliott Hughes <[email protected]> Date: Fri, 14 Sep 2018 09:54:45 -0700 Subject: [PATCH] Fix glibc build after 013876f067a11ebfcf47789921b376e7bf3bf5b8. /usr/include/unistd.h:626:15: error: conflicting types for 'confstr' --- lib/portability.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/portability.h b/lib/portability.h index 0404c85..8e1049f 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -257,8 +257,8 @@ extern CODE prioritynames[], facilitynames[]; #endif void xgetrandom(void *buf, unsigned len, unsigned flags); -// android NDK doesn't have confstr -#ifndef _CS_PATH +// Android's bionic libc doesn't have confstr. +#ifdef __BIONIC__ #define _CS_PATH 0 #define _CS_V7_ENV 1 #include <string.h> -- 2.19.0.397.gdd90340f6a-goog
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
