libuv: Backport MinGW-w64 compilation fix to CMake 3.22 branch

Backport libuv commit `3e90bc76` (build: fix build failures with MinGW
new headers, 2021-11-03).

Fixes: #22916
This commit is contained in:
Brad King
2021-11-16 11:57:45 -05:00
parent 40ae565832
commit acc14edd70

View File

@@ -45,7 +45,14 @@ typedef struct pollfd {
#endif
#include <mswsock.h>
// Disable the typedef in mstcpip.h of MinGW.
#define _TCP_INITIAL_RTO_PARAMETERS _TCP_INITIAL_RTO_PARAMETERS__AVOID
#define TCP_INITIAL_RTO_PARAMETERS TCP_INITIAL_RTO_PARAMETERS__AVOID
#define PTCP_INITIAL_RTO_PARAMETERS PTCP_INITIAL_RTO_PARAMETERS__AVOID
#include <ws2tcpip.h>
#undef _TCP_INITIAL_RTO_PARAMETERS
#undef TCP_INITIAL_RTO_PARAMETERS
#undef PTCP_INITIAL_RTO_PARAMETERS
#include <windows.h>
#include <process.h>