From d01ba2e824813f5ab4eb0b379caf77fe93d6911c Mon Sep 17 00:00:00 2001 From: klutzy Date: Thu, 7 Nov 2013 13:37:20 +0900 Subject: [PATCH] Define WSAPOLLFD only on mingw 4.x Fixes #10327 --- src/etc/mingw-fix-include/winsock2.h | 5 +++++ 1 file changed, 5 insertions(+) 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 +// 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