ares.h: there is no ares_free_soa function
[platform/upstream/c-ares.git] / inet_ntop.c
index 77fe4a6..9420f6c 100644 (file)
@@ -59,13 +59,13 @@ static const char *inet_ntop6(const unsigned char *src, char *dst, size_t size);
  *     Paul Vixie, 1996.
  */
 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) {
   case AF_INET:
-    return (inet_ntop4(src, dst, size));
+    return (inet_ntop4(src, dst, (size_t)size));
   case AF_INET6:
-    return (inet_ntop6(src, dst, size));
+    return (inet_ntop6(src, dst, (size_t)size));
   default:
     SET_ERRNO(EAFNOSUPPORT);
     return (NULL);
@@ -195,11 +195,14 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size)
   strcpy(dst, tmp);
   return (dst);
 }
+
 #else /* HAVE_INET_NTOP */
 
-const char *ares_inet_ntop(int af, const void *src, char *dst, socklen_t size)
+const char *
+ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size)
 {
   /* just relay this to the underlying function */
   return inet_ntop(af, src, dst, size);
 }
+
 #endif /* HAVE_INET_NTOP */