summaryrefslogtreecommitdiff
path: root/gl/tests/fcntl.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/tests/fcntl.in.h')
-rw-r--r--gl/tests/fcntl.in.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gl/tests/fcntl.in.h b/gl/tests/fcntl.in.h
index 84ae3eeaa1..344bbe4d3d 100644
--- a/gl/tests/fcntl.in.h
+++ b/gl/tests/fcntl.in.h
@@ -62,6 +62,12 @@
# include <unistd.h>
#endif
+/* Native Windows platforms declare open(), creat() in <io.h>. */
+#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */