*/
typedef int verify_int_size[4 <= sizeof (int) ? 1 : -1];
-static const char *inet_ntop4 (const unsigned char *src, char *dst, socklen_t size);
+static const char *inet_ntop4 (const unsigned char *src, char *dst, unsigned size);
# if HAVE_IPV6
-static const char *inet_ntop6 (const unsigned char *src, char *dst, socklen_t size);
+static const char *inet_ntop6 (const unsigned char *src, char *dst, unsigned size);
# endif
*/
const char *
inet_ntop (int af, const void *restrict src,
- char *restrict dst, socklen_t cnt)
+ char *restrict dst, unsigned cnt)
{
switch (af)
{
* Paul Vixie, 1996.
*/
static const char *
-inet_ntop4 (const unsigned char *src, char *dst, socklen_t size)
+inet_ntop4 (const unsigned char *src, char *dst, unsigned size)
{
char tmp[sizeof "255.255.255.255"];
int len;
* Paul Vixie, 1996.
*/
static const char *
-inet_ntop6 (const unsigned char *src, char *dst, socklen_t size)
+inet_ntop6 (const unsigned char *src, char *dst, unsigned size)
{
/*
* Note that int32_t and int16_t need only be "at least" large enough
/*
* Check for overflow, copy, and we're done.
*/
- if ((socklen_t) (tp - tmp) > size)
+ if ((unsigned) (tp - tmp) > size)
{
errno = ENOSPC;
return NULL;
#ifndef HAVE_INET_NTOP
# define inet_ntop _gnutls_inet_ntop
const char *inet_ntop(int af, const void *src,
- char *dst, socklen_t size);
+ char *dst, unsigned size);
#endif
#endif /* SYSTEM_H */