mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-29 20:53:39 +08:00
Update.
* sysdeps/posix/getaddrinfo.c (gaih_inet): For AI_CANONNAME, determine the canonical name only for the first returned entry.
This commit is contained in:
parent
5a6ae8da1d
commit
163288fe2e
@ -1,5 +1,8 @@
|
||||
2004-06-18 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/posix/getaddrinfo.c (gaih_inet): For AI_CANONNAME,
|
||||
determine the canonical name only for the first returned entry.
|
||||
|
||||
* inet/bug-if1.c: New file.
|
||||
* inet/Makefile (tests): Add bug-if1.
|
||||
|
||||
|
@ -762,7 +762,6 @@ gaih_inet (const char *name, const struct gaih_service *service,
|
||||
return 0;
|
||||
|
||||
{
|
||||
const char *c = NULL;
|
||||
struct gaih_servtuple *st2;
|
||||
struct gaih_addrtuple *at2 = at;
|
||||
size_t socklen, namelen;
|
||||
@ -773,7 +772,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
|
||||
*/
|
||||
while (at2 != NULL)
|
||||
{
|
||||
if (req->ai_flags & AI_CANONNAME)
|
||||
const char *c = NULL;
|
||||
|
||||
/* Only the first entry gets the canonical name. */
|
||||
if (at2 == at && (req->ai_flags & AI_CANONNAME) != 0)
|
||||
{
|
||||
struct hostent *h = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user