Prechádzať zdrojové kódy

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
Brad King 4 rokov pred
rodič
commit
acc14edd70
1 zmenil súbory, kde vykonal 7 pridanie a 0 odobranie
  1. 7 0
      Utilities/cmlibuv/include/uv/win.h

+ 7 - 0
Utilities/cmlibuv/include/uv/win.h

@@ -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>