about summary refs log tree commit diff
path: root/src/etc/mingw-fix-include
diff options
context:
space:
mode:
authorklutzy <klutzytheklutzy@gmail.com>2013-11-07 13:37:20 +0900
committerklutzy <klutzytheklutzy@gmail.com>2013-11-08 15:00:40 +0900
commitd01ba2e824813f5ab4eb0b379caf77fe93d6911c (patch)
treeca4094a7cac5c9c010dda6c9672e1d502053d44a /src/etc/mingw-fix-include
parent22eb11c09ba8939ab06351eb5d14b355f632e197 (diff)
downloadrust-d01ba2e824813f5ab4eb0b379caf77fe93d6911c.tar.gz
rust-d01ba2e824813f5ab4eb0b379caf77fe93d6911c.zip
Define WSAPOLLFD only on mingw 4.x
Fixes #10327
Diffstat (limited to 'src/etc/mingw-fix-include')
-rw-r--r--src/etc/mingw-fix-include/winsock2.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/etc/mingw-fix-include/winsock2.h b/src/etc/mingw-fix-include/winsock2.h
index 36b58dcd1ee..9fb32ca7ea5 100644
--- a/src/etc/mingw-fix-include/winsock2.h
+++ b/src/etc/mingw-fix-include/winsock2.h
@@ -3,6 +3,9 @@
 
 #include_next <winsock2.h>
 
+// mingw 4.0.x has broken headers (#9246) but mingw-w64 does not.
+#if defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION == 4
+
 typedef struct pollfd {
   SOCKET fd;
   short  events;
@@ -10,3 +13,5 @@ typedef struct pollfd {
 } WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
 
 #endif
+
+#endif // _FIX_WINSOCK2_H