inet_ntop.c: s/socklen_t/ares_socklen_t for portability

pull/10/head
Yang Tse 12 years ago
parent ecf6f65b43
commit b82874ad6f
  1. 6
      inet_ntop.c

@ -59,13 +59,13 @@ static const char *inet_ntop6(const unsigned char *src, char *dst, size_t size);
* Paul Vixie, 1996. * Paul Vixie, 1996.
*/ */
const char * const char *
ares_inet_ntop(int af, const void *src, char *dst, socklen_t size) ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size)
{ {
switch (af) { switch (af) {
case AF_INET: case AF_INET:
return (inet_ntop4(src, dst, size)); return (inet_ntop4(src, dst, (size_t)size));
case AF_INET6: case AF_INET6:
return (inet_ntop6(src, dst, size)); return (inet_ntop6(src, dst, (size_t)size));
default: default:
SET_ERRNO(EAFNOSUPPORT); SET_ERRNO(EAFNOSUPPORT);
return (NULL); return (NULL);

Loading…
Cancel
Save