diff --git a/ixwebsocket/IXNetSystem.cpp b/ixwebsocket/IXNetSystem.cpp index bfb98a01..2a767c1a 100644 --- a/ixwebsocket/IXNetSystem.cpp +++ b/ixwebsocket/IXNetSystem.cpp @@ -6,6 +6,20 @@ #include "IXNetSystem.h" +// mingw does not have those +#if defined(_WIN32) && defined(__GNUC__) +const char * inet_ntop(int af, const void * restrict src, char * restrict dst, socklen_t size) +{ + return nullptr; +} + +int inet_pton(int af, const char * restrict src, void * restrict dst) +{ + return -1; +} +#endif + + namespace ix { bool initNetSystem() diff --git a/ixwebsocket/IXNetSystem.h b/ixwebsocket/IXNetSystem.h index 86fec3b5..203a4e45 100644 --- a/ixwebsocket/IXNetSystem.h +++ b/ixwebsocket/IXNetSystem.h @@ -47,6 +47,12 @@ struct pollfd { #include #endif +// mingw does not have those +#if defined(_WIN32) && defined(__GNUC__) +const char * inet_ntop(int af, const void * restrict src, char * restrict dst, socklen_t size); +int inet_pton(int af, const char * restrict src, void * restrict dst); +#endif + namespace ix { #ifdef _WIN32