summaryrefslogtreecommitdiff
path: root/gl/lib/stdio.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/lib/stdio.in.h')
-rw-r--r--gl/lib/stdio.in.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gl/lib/stdio.in.h b/gl/lib/stdio.in.h
index acf29c4b..4a8aa555 100644
--- a/gl/lib/stdio.in.h
+++ b/gl/lib/stdio.in.h
@@ -118,6 +118,13 @@
# include <unistd.h>
#endif
+/* Android 4.3 declares renameat in <sys/stat.h>, not in <stdio.h>. */
+/* But in any case avoid namespace pollution on glibc systems. */
+#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \
+ && ! defined __GLIBC__
+# include <sys/stat.h>
+#endif
+
/* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include
it before we #define perror rpl_perror. */
/* But in any case avoid namespace pollution on glibc systems. */