https://bugs.gentoo.org/898598 https://github.com/coreutils/gnulib/commit/3c136a2cc38d71083f123231a8b9ad4b01930789 --- a/configure +++ b/configure @@ -17084,6 +17084,8 @@ else #include #include #include +/* Android 4.3 declares fchownat() in instead. */ +#include #include int main () @@ -17130,6 +17132,8 @@ else /* end confdefs.h. */ #include #include + /* Android 4.3 declares fchownat() in instead. */ + #include int main () --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -113,6 +113,13 @@ # include #endif +/* Android 4.3 declares fchownat in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (@GNULIB_FCHOWNAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \ + && !defined __GLIBC__ +# include +#endif + /* MSVC defines off_t in . May also define off_t to a 64-bit type on native Windows. */ #if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@