aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-11-10 04:23:15 +0000
committerYang Tse <yangsita@gmail.com>2007-11-10 04:23:15 +0000
commit9a39839a43c3eb1e053b7761f7fee4b083d49523 (patch)
treee8de63463b42a31bde154c98f6b59b821a0d91b6
parente87c996fe04ea16468af0fa13d89034b15fd36de (diff)
Some versions of winsock2.h have pollfd struct and constants
-rw-r--r--lib/select.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/select.h b/lib/select.h
index a97947e40..54c7c75cf 100644
--- a/lib/select.h
+++ b/lib/select.h
@@ -40,13 +40,16 @@
#undef HAVE_POLL_FINE
#define HAVE_POLL_FINE 1
#define poll(x,y,z) WSAPoll((x),(y),(z))
+#if defined(_MSC_VER) && defined(POLLRDNORM)
+#define HAVE_STRUCT_POLLFD 1
+#endif
#endif
/*
* Definition of pollfd struct and constants for platforms lacking them.
*/
-#ifndef HAVE_SYS_POLL_H
+#if !defined(HAVE_STRUCT_POLLFD) && !defined(HAVE_SYS_POLL_H)
#define POLLIN 0x01
#define POLLPRI 0x02