Numerous fixes related to compiling for mingw
[m6w6/libmemcached] / poll / poll.c
index c5aa1115918a999bb2cd0810450bf2a5d2917bbf..d7a7d9c7d73710cb7580e40a8f4c2bf1d792e1d2 100644 (file)
@@ -9,9 +9,17 @@
  *
  */
 #include "config.h"
+
+#if defined(WIN32) || defined(__MINGW32__)
+# include <winsock2.h>
+# include <ws2tcpip.h>
+#endif
+
 #include <sys/time.h>
 #include <strings.h>
 
+#include "poll/poll.h"
+
 int poll(struct pollfd fds[], nfds_t nfds, int tmo)
 {
   fd_set readfds, writefds, errorfds;