aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-21 19:12:24 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-21 19:12:24 +0000
commitfb7268b292b9dd1bcf11b47b4deadd0bbf6195af (patch)
tree23554bc7d151db7fb55a9c4ea8bb4e549e4452af /sysdeps
parent9ca00c5b8e416cd2b0b80c85f23a21d6f26ada1f (diff)
downloadglibc-fb7268b292b9dd1bcf11b47b4deadd0bbf6195af.tar
glibc-fb7268b292b9dd1bcf11b47b4deadd0bbf6195af.tar.gz
glibc-fb7268b292b9dd1bcf11b47b4deadd0bbf6195af.tar.bz2
glibc-fb7268b292b9dd1bcf11b47b4deadd0bbf6195af.zip
Update.
* sysdeps/posix/getaddrinfo.c (gethosts): Handle TRY_AGAIN error of gethostbyname2_r call.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/posix/getaddrinfo.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 45d1da22f9..17d27e786e 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -266,10 +266,18 @@ gaih_inet_serv (const char *servicename, struct gaih_typeproto *tp,
rc = __gethostbyname2_r (name, _family, &th, tmpbuf, \
tmpbuflen, &h, &herrno); \
} while (rc == ERANGE && herrno == NETDB_INTERNAL); \
- if (rc != 0 && herrno == NETDB_INTERNAL) \
+ if (rc != 0) \
{ \
- __set_h_errno (herrno); \
- return -EAI_SYSTEM; \
+ if (herrno == NETDB_INTERNAL) \
+ { \
+ __set_h_errno (herrno); \
+ return -EAI_SYSTEM; \
+ } \
+ if (herrno == TRY_AGAIN) \
+ { \
+ __set_h_errno (herrno); \
+ return -EAI_AGAIN; \
+ } \
} \
if (h != NULL) \
{ \