Skip to content

Commit d01ba2e

Browse files
committed
Define WSAPOLLFD only on mingw 4.x
Fixes #10327
1 parent 22eb11c commit d01ba2e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/etc/mingw-fix-include/winsock2.h

+5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33

44
#include_next <winsock2.h>
55

6+
// mingw 4.0.x has broken headers (#9246) but mingw-w64 does not.
7+
#if defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION == 4
8+
69
typedef struct pollfd {
710
SOCKET fd;
811
short events;
912
short revents;
1013
} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
1114

1215
#endif
16+
17+
#endif // _FIX_WINSOCK2_H

0 commit comments

Comments
 (0)