diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-09-17 12:55:30 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-09-17 12:55:30 +0400 |
commit | 5da8b1281b4a9bb9c1748cd72a73af3b97a1f9fb (patch) | |
tree | 00252681cbb5d64e143f6894ce8546966e1e9df7 /winsup/cygwin/net.cc | |
parent | b3ecdcf438d47d78e8a6b029c209ebf6f2fea7fe (diff) |
* net.cc (cygwin_inet_ntop): Change len argument to socklen_t to
follow SUSv3.
* include/arpa/inet.h (inet_ntop): Ditto.
* include/cygwin/in.h: Include cygwin/socket.h to get socklen_t.
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r-- | winsup/cygwin/net.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 3a9684932..7b2c2264f 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -2290,7 +2290,7 @@ cygwin_inet_pton (int family, const char *strptr, void *addrptr) /* See "UNIX Network Programming, Networing APIs: Sockets and XTI", W. Richard Stevens, Prentice Hall PTR, 1998. */ extern "C" const char * -cygwin_inet_ntop (int family, const void *addrptr, char *strptr, size_t len) +cygwin_inet_ntop (int family, const void *addrptr, char *strptr, socklen_t len) { const u_char *p = (const u_char *) addrptr; @@ -2302,7 +2302,7 @@ cygwin_inet_ntop (int family, const void *addrptr, char *strptr, size_t len) char temp[64]; /* Big enough for 4 ints ... */ __small_sprintf (temp, "%u.%u.%u.%u", p[0], p[1], p[2], p[3]); - if (strlen (temp) >= len) + if (strlen (temp) >= (size_t) len) { set_errno (ENOSPC); return NULL; |