Index: lib/select.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/select.c,v
retrieving revision 1.17
diff -u -r1.17 select.c
--- lib/select.c	5 May 2006 10:24:27 -0000	1.17
+++ lib/select.c	23 Sep 2006 22:07:43 -0000
@@ -74,7 +74,7 @@
  */
 int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
 {
-#ifdef HAVE_POLL_FINE
+#if defined(HAVE_POLL_FINE) || defined(CURL_HAVE_WSAPOLL)
   struct pollfd pfd[2];
   int num;
   int r;
@@ -92,9 +92,13 @@
     num++;
   }
 
+#ifdef HAVE_POLL_FINE
   do {
     r = poll(pfd, num, timeout_ms);
   } while((r == -1) && (errno == EINTR));
+#else
+  r = WSAPoll(pfd, num, timeout_ms);
+#endif
 
   if (r < 0)
     return -1;
@@ -194,6 +198,8 @@
   do {
     r = poll(ufds, nfds, timeout_ms);
   } while((r == -1) && (errno == EINTR));
+#elif defined(CURL_HAVE_WSAPOLL)
+  r = WSAPoll(ufds, nfds, timeout_ms);
 #else
   struct timeval timeout;
   struct timeval *ptimeout;
Index: lib/select.h
===================================================================
RCS file: /cvsroot/curl/curl/lib/select.h,v
retrieving revision 1.4
diff -u -r1.4 select.h
--- lib/select.h	7 Apr 2006 21:50:47 -0000	1.4
+++ lib/select.h	23 Sep 2006 22:06:28 -0000
@@ -25,6 +25,10 @@
 
 #ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>
+#elif defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0600
+// for Vista, use WSAPoll().
+#include <winsock2.h>
+#define CURL_HAVE_WSAPOLL
 #else
 
 #define POLLIN      0x01

