summaryrefslogtreecommitdiff
path: root/nss/getXXbyYY_r.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2013-01-21 17:41:28 +0100
committerAndreas Schwab <schwab@suse.de>2013-05-21 12:26:33 +0200
commitd5dd6189d506068ed11c8bfa1e1e9bffde04decd (patch)
tree70f57dbbd1771600abbdcd6263aade8822357926 /nss/getXXbyYY_r.c
parentfef94eab0bd308d5059a2588c753bf9a4926845d (diff)
downloadglibc-d5dd6189d506068ed11c8bfa1e1e9bffde04decd.tar.gz
Fix parsing of numeric hosts in gethostbyname_r
Diffstat (limited to 'nss/getXXbyYY_r.c')
-rw-r--r--nss/getXXbyYY_r.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 1067744d63..44d00f4bcf 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -179,6 +179,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
case -1:
return errno;
case 1:
+#ifdef NEED_H_ERRNO
+ any_service = true;
+#endif
goto done;
}
#endif
@@ -288,7 +291,7 @@ done:
/* Either we failed to lookup the functions or the functions themselves
had a system error. Set NETDB_INTERNAL here to let the caller know
that the errno may have the real reason for failure. */
- *h_errnop = NETDB_INTERNAL;
+ *h_errnop = NETDB_INTERNAL;
else if (status != NSS_STATUS_SUCCESS && !any_service)
/* We were not able to use any service. */
*h_errnop = NO_RECOVERY;