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 changing the name in the definition in
  mstcpip.h.
  • Loading branch information
erw7 committed Nov 1, 2021
1 parent 5246ce4 commit 71d8f34
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/uv/win.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 71d8f34

Please sign in to comment.