Commit 810702d4 authored by Richard Diamond's avatar Richard Diamond Committed by Jean-Baptiste Kempf

compat: fix inet_pton declaration

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 0be62e5e
......@@ -30,6 +30,7 @@
# include <sys/socket.h>
#else
# include <winsock2.h>
# include <ws2tcpip.h>
# 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;
......
......@@ -320,8 +320,13 @@ void swab (const void *, void *, ssize_t);
/* Socket stuff */
#ifndef HAVE_INET_PTON
# ifndef _WIN32
# include <sys/socket.h>
# else
# include <ws2tcpip.h>
# 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment