stub inet_ntop and inet_pton function that mingw does not have
This commit is contained in:
parent
461641f3d0
commit
85bcdaaec3
@ -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()
|
||||
|
@ -47,6 +47,12 @@ struct pollfd {
|
||||
#include <unistd.h>
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user