diff --git a/compat/inet_pton.c b/compat/inet_pton.c index fb825c20a4..7052a1a7a5 100644 --- a/compat/inet_pton.c +++ b/compat/inet_pton.c @@ -30,6 +30,7 @@ # include #else # include +# include # undef EAFNOSUPPORT # define EAFNOSUPPORT WSAEAFNOSUPPORT #endif @@ -48,7 +49,7 @@ int inet_pton (int af, const char *src, void *dst) return -1; } -const char *inet_ntop (int af, const void *src, char *dst, int len) +const char *inet_ntop (int af, const void *src, char *dst, socklen_t len) { const unsigned char *b = src; diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h index 39581ffa3a..2b4fe20bd6 100644 --- a/include/vlc_fixups.h +++ b/include/vlc_fixups.h @@ -320,8 +320,13 @@ void swab (const void *, void *, ssize_t); /* Socket stuff */ #ifndef HAVE_INET_PTON +# ifndef _WIN32 +# include +# else +# include +# endif int inet_pton(int, const char *, void *); -const char *inet_ntop(int, const void *, char *, int); +const char *inet_ntop(int, const void *, char *, socklen_t); #endif #ifndef HAVE_STRUCT_POLLFD