diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-05-16 22:02:44 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2008-05-16 22:02:44 +0000 |
commit | 4681f435969ca9806da160d3ae564668ddfecfe2 (patch) | |
tree | ef72f3c416efb355d193caf746e760f8de52b113 /sysdeps/posix | |
parent | 78463734c14d180e4d8e16c6e66fb213fc3479c0 (diff) | |
download | glibc-4681f435969ca9806da160d3ae564668ddfecfe2.tar.gz glibc-4681f435969ca9806da160d3ae564668ddfecfe2.tar.xz glibc-4681f435969ca9806da160d3ae564668ddfecfe2.zip |
Updated to fedora-glibc-20080516T2152 cvs/fedora-glibc-2_8_90-2
Diffstat (limited to 'sysdeps/posix')
-rw-r--r-- | sysdeps/posix/getaddrinfo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 8908fc10c3..2515d23c26 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -729,7 +729,8 @@ gaih_inet (const char *name, const struct gaih_service *service, if (status == NSS_STATUS_SUCCESS) { - canon = (*pat)->name; + if ((req->ai_flags & AI_CANONNAME) != 0 && canon == NULL) + canon = (*pat)->name; while (*pat != NULL) pat = &((*pat)->next); @@ -953,7 +954,7 @@ gaih_inet (const char *name, const struct gaih_service *service, return -EAI_IDN_ENCODE; } /* In case the output string is the same as the input - string no new string has been allocated. Otherwise + string no new string has been allocated and we make a copy. */ if (out == canon) goto make_copy; |