summaryrefslogtreecommitdiff
path: root/lib/sys_select.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-10-04 02:32:48 +0200
committerBruno Haible <bruno@clisp.org>2011-10-04 02:32:48 +0200
commit1905965d890e9a5d096fc92dbf3b164754dcf893 (patch)
treed6c612ac8b50b39cd319558e34851b471a8e8f7f /lib/sys_select.in.h
parent53e969508b6bf0d4b7c26d03c7a88eb9dd9fb7d2 (diff)
downloadgnulib-1905965d890e9a5d096fc92dbf3b164754dcf893.tar.gz
sys_select: Fix compilation error on mingw.
* lib/sys_select.in.h: On native Windows, include <io.h>.
Diffstat (limited to 'lib/sys_select.in.h')
-rw-r--r--lib/sys_select.in.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index 7d43c2782b..397508aac4 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -95,11 +95,15 @@
# include <string.h>
# endif
/* On native Windows platforms:
- Get the 'fd_set' type. */
-# if @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
-# define _GL_INCLUDING_WINSOCK2_H
-# include <winsock2.h>
-# undef _GL_INCLUDING_WINSOCK2_H
+ Get the 'fd_set' type.
+ Get the close() declaration before we override it. */
+# if @HAVE_WINSOCK2_H@
+# if !defined _GL_INCLUDING_WINSOCK2_H
+# define _GL_INCLUDING_WINSOCK2_H
+# include <winsock2.h>
+# undef _GL_INCLUDING_WINSOCK2_H
+# endif
+# include <io.h>
# endif
#endif