Skip to content

Commit

Permalink
build: fix build failures with MinGW new headers
Browse files Browse the repository at this point in the history
A structure definition was added to mstcpip.h in
mingw-w64-x86_64-headers-git 9.0.0.6327.f29c1101f, which causes a conflict
and the build fails. Fix this by deleting the definition of the problematic
structure in the libuv side and include mstcpip.h.
  • Loading branch information
erw7 committed Nov 1, 2021
1 parent 5246ce4 commit 2dedcf2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions include/uv/win.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ typedef struct pollfd {

#include <mswsock.h>
#include <ws2tcpip.h>
#include <mstcpip.h>
#include <windows.h>

#include <process.h>
Expand Down
6 changes: 0 additions & 6 deletions src/win/winapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -4726,12 +4726,6 @@ typedef HWINEVENTHOOK (WINAPI *sSetWinEventHook)
DWORD idThread,
UINT dwflags);

/* From mstcpip.h */
typedef struct _TCP_INITIAL_RTO_PARAMETERS {
USHORT Rtt;
UCHAR MaxSynRetransmissions;
} TCP_INITIAL_RTO_PARAMETERS, *PTCP_INITIAL_RTO_PARAMETERS;

#ifndef TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS
# define TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS ((UCHAR) -2)
#endif
Expand Down

0 comments on commit 2dedcf2

Please sign in to comment.