Hi,

Attached are two small patch fixing poll module compilation under MinGW:

- gnulib-poll-depend.diff:
Add a dependencies on the sys_select module, fixing inclusion error
under MinGW.

- gnulib-sys_socket-error.diff: 
Under MinGW, map error code required by the poll module (namely
ESHUTDOWN, ECONNRESET, ECONNABORTED, ENETRESET, ENOTCONN), plus some
other useful error code.


Regards,

-- 
Yoann Vandoorselaere | Responsable R&D / CTO | PreludeIDS Technologies
Tel: +33 (0)8 70 70 21 58                  Fax: +33(0)4 78 42 21 58
http://www.prelude-ids.com
Index: modules/poll
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/poll,v
retrieving revision 1.13
diff -u -r1.13 poll
--- modules/poll	13 Oct 2006 12:40:23 -0000	1.13
+++ modules/poll	16 Jan 2007 10:06:42 -0000
@@ -7,6 +7,7 @@
 m4/poll.m4
 
 Depends-on:
+sys_select
 
 configure.ac:
 gl_FUNC_POLL
Index: lib/socket_.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/socket_.h,v
retrieving revision 1.7
diff -u -r1.7 socket_.h
--- lib/socket_.h	21 Jun 2006 21:21:42 -0000	1.7
+++ lib/socket_.h	16 Jan 2007 10:07:09 -0000
@@ -57,4 +57,14 @@
 # define SHUT_RDWR SD_BOTH
 #endif
 
+#if defined _WIN32 || defined __WIN32__
+# define ENOTSOCK                WSAENOTSOCK
+# define EADDRINUSE              WSAEADDRINUSE
+# define ENETRESET               WSAENETRESET
+# define ECONNABORTED            WSAECONNABORTED
+# define ECONNRESET              WSAECONNRESET
+# define ENOTCONN                WSAENOTCONN
+# define ESHUTDOWN               WSAESHUTDOWN
+#endif
+
 #endif /* _SYS_SOCKET_H */

Reply via email to