Thanks for the report.  How about the attached patch instead?  I've pushed it.
>From 79aeac1a022daa372715ffbbc2bff641569acfb5 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Tue, 24 Feb 2015 16:16:19 -0800
Subject: [PATCH] poll: port to MSVC v18 on MS-Windows 8.1

Problem reported by Gisle Vanem in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00139.html
* lib/poll.c: Always include <sys/select.h> and <sys/socket.h>.
* modules/poll (Depends-on) [!HAVE_POLL || REPLACE_POLL]:
Add sys_socket.
---
 ChangeLog    | 9 +++++++++
 lib/poll.c   | 5 +++--
 modules/poll | 1 +
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2262efa..42351a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-02-24  Paul Eggert  <egg...@cs.ucla.edu>
+
+	poll: port to MSVC v18 on MS-Windows 8.1
+	Problem reported by Gisle Vanem in:
+	http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00139.html
+	* lib/poll.c: Always include <sys/select.h> and <sys/socket.h>.
+	* modules/poll (Depends-on) [!HAVE_POLL || REPLACE_POLL]:
+	Add sys_socket.
+
 2015-02-24  Pádraig Brady  <p...@draigbrady.com>
 
 	tests: support stderr verification with returns_()
diff --git a/lib/poll.c b/lib/poll.c
index 12531d9..6990808 100644
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -44,11 +44,12 @@
 # include "msvc-nothrow.h"
 #else
 # include <sys/time.h>
-# include <sys/socket.h>
-# include <sys/select.h>
 # include <unistd.h>
 #endif
 
+#include <sys/select.h>
+#include <sys/socket.h>
+
 #ifdef HAVE_SYS_IOCTL_H
 # include <sys/ioctl.h>
 #endif
diff --git a/modules/poll b/modules/poll
index b1d928d..57f0631 100644
--- a/modules/poll
+++ b/modules/poll
@@ -12,6 +12,7 @@ assure          [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 select          [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 sockets         [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 sys_select      [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
+sys_socket      [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 sys_time        [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 errno           [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 msvc-nothrow    [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
-- 
2.1.0

Reply via email to