forked from enlightenment/efl
parent
2c6a86fb6d
commit
e74bd3d04b
|
@ -624,20 +624,9 @@ ares_inet_ntop(int af, const void *src, char *dst, size_t size)
|
|||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
const char *evil_inet_ntop(int af, const char *src, void *dst)
|
||||
const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size)
|
||||
{
|
||||
const char *result;
|
||||
size_t size;
|
||||
|
||||
if (af == AF_INET)
|
||||
size = sizeof(struct in_addr);
|
||||
else if (af == AF_INET6)
|
||||
size = sizeof(struct ares_in6_addr);
|
||||
else
|
||||
{
|
||||
SET_ERRNO(EAFNOSUPPORT);
|
||||
return NULL;
|
||||
}
|
||||
result = ares_inet_ntop(af, src, dst, size);
|
||||
if ((result == NULL) && (ERRNO == ENOSPC))
|
||||
return NULL;
|
||||
|
|
|
@ -32,9 +32,9 @@ EAPI int evil_inet_pton(int af, const char *src, void *dst);
|
|||
|
||||
#define inet_pton(x,y,z) evil_inet_pton(x,y,z)
|
||||
|
||||
EAPI const char *evil_inet_ntop(int af, const char *src, void *dst);
|
||||
EAPI const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size);
|
||||
|
||||
#define inet_ntop(x,y,z) evil_inet_ntop(x,y,z)
|
||||
#define inet_ntop(x,y,z,s) evil_inet_ntop(x,y,z,s)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue