aboutsummaryrefslogtreecommitdiff
path: root/third-party/patches/libuv-disable-typedef-MinGW.patch
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2021-10-31 18:03:30 +0900
committererw7 <erw7.github@gmail.com>2021-11-01 00:07:16 +0900
commit0503e1737559a61509e84927d95bb14fff8ba5f6 (patch)
tree1880ed98f41072dde8d2344214bf0390889ae409 /third-party/patches/libuv-disable-typedef-MinGW.patch
parent346227e3ad8f2855364f7e40f803b85be237be42 (diff)
downloadrneovim-0503e1737559a61509e84927d95bb14fff8ba5f6.tar.gz
rneovim-0503e1737559a61509e84927d95bb14fff8ba5f6.tar.bz2
rneovim-0503e1737559a61509e84927d95bb14fff8ba5f6.zip
fix(build): fix build failure in MinGW
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.
Diffstat (limited to 'third-party/patches/libuv-disable-typedef-MinGW.patch')
-rw-r--r--third-party/patches/libuv-disable-typedef-MinGW.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/third-party/patches/libuv-disable-typedef-MinGW.patch b/third-party/patches/libuv-disable-typedef-MinGW.patch
new file mode 100644
index 0000000000..a47893cede
--- /dev/null
+++ b/third-party/patches/libuv-disable-typedef-MinGW.patch
@@ -0,0 +1,19 @@
+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>