mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-19 13:40:59 +08:00
Update.
* nss/getent.c (ahosts_keys_int): Correctly print IPv6 addresses.
This commit is contained in:
parent
a7d248330f
commit
a691b21725
@ -1,5 +1,7 @@
|
||||
2004-08-15 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* nss/getent.c (ahosts_keys_int): Correctly print IPv6 addresses.
|
||||
|
||||
* nss/getent.c: Allow queries for getaddrinfo with AF_INET and
|
||||
AF_INET6.
|
||||
|
||||
|
@ -345,7 +345,9 @@ ahosts_keys_int (int af, int xflags, int number, char *key[])
|
||||
char buf[INET6_ADDRSTRLEN];
|
||||
printf ("%-15s %-6s %s\n",
|
||||
inet_ntop (runp->ai_family,
|
||||
&((struct sockaddr_in *) runp->ai_addr)->sin_addr,
|
||||
runp->ai_family == AF_INET
|
||||
? (void *) &((struct sockaddr_in *) runp->ai_addr)->sin_addr
|
||||
: (void *) &((struct sockaddr_in6 *) runp->ai_addr)->sin6_addr,
|
||||
buf, sizeof (buf)),
|
||||
sockstr,
|
||||
runp->ai_canonname ?: "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user