diff --git a/src/network/socket_wrapper.hpp b/src/network/socket_wrapper.hpp index caa12c279133..e4d63c434fc4 100644 --- a/src/network/socket_wrapper.hpp +++ b/src/network/socket_wrapper.hpp @@ -60,6 +60,9 @@ const int INVALID_SOCKET = -1; #endif #ifdef _WIN32 +#ifndef _UCRT +// Recent MinGW has inet_pton, which then causes compiler error in +// combination with this replacement. #ifndef _MSC_VER // not using visual studio in windows inline int inet_pton(int af, const char *src, void *dst) { @@ -86,6 +89,7 @@ inline int inet_pton(int af, const char *src, void *dst) { } #endif #endif +#endif #define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x)) #define FREE(x) HeapFree(GetProcessHeap(), 0, (x))