Skip to content

Commit

Permalink
apply patch for R4.2 on Windows (#4923)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyu1994 authored and StrikerRUS committed Jan 6, 2022
1 parent 8e5659d commit 4e3fa2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/network/socket_wrapper.hpp
Expand Up @@ -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) {
Expand All @@ -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))
Expand Down

0 comments on commit 4e3fa2e

Please sign in to comment.