mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
The new MinGW fails to build libuv due to a typedef conflict between mstcpip.h and src/win/winapi.h. This change avoids conflicts by disabling typedef in the MinGW header.
20 lines
624 B
Diff
20 lines
624 B
Diff
diff --git a/include/uv/win.h b/include/uv/win.h
|
|
index f5f1d3a3..64a0dfd9 100644
|
|
--- a/include/uv/win.h
|
|
+++ b/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__
|
|
+#define TCP_INITIAL_RTO_PARAMETERS TCP_INITIAL_RTO_PARAMETERS__
|
|
+#define PTCP_INITIAL_RTO_PARAMETERS PTCP_INITIAL_RTO_PARAMETERS__
|
|
#include <ws2tcpip.h>
|
|
+#undef _TCP_INITIAL_RTO_PARAMETERS
|
|
+#undef TCP_INITIAL_RTO_PARAMETERS
|
|
+#undef PTCP_INITIAL_RTO_PARAMETERS
|
|
#include <windows.h>
|
|
|
|
#include <process.h>
|