aboutsummaryrefslogtreecommitdiff
path: root/resolv/nss_dns
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-10 20:43:35 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-10 20:43:35 +0000
commitf80f1a4a96d86569fe224c42795f7877b26015b5 (patch)
tree6b393666b6a3f001c01e315beb250e914c5725d5 /resolv/nss_dns
parent47a81620adc8c33631bd4b3b8d122c2a17940f8c (diff)
downloadglibc-f80f1a4a96d86569fe224c42795f7877b26015b5.zip
glibc-f80f1a4a96d86569fe224c42795f7877b26015b5.tar.gz
glibc-f80f1a4a96d86569fe224c42795f7877b26015b5.tar.bz2
Update.
2000-07-10 Mark Kettenis <kettenis@gnu.org> * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Use res_hostalias instead of __hostalias for thread-safety.
Diffstat (limited to 'resolv/nss_dns')
-rw-r--r--resolv/nss_dns/dns-host.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index e99d964..f7b1007 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -131,6 +131,7 @@ _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
int *h_errnop)
{
querybuf host_buffer;
+ char tmp[NS_MAXDNAME];
int size, type, n;
const char *cp;
int map = 0;
@@ -161,7 +162,8 @@ _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
* this is also done in res_query() since we are not the only
* function that looks up host names.
*/
- if (strchr (name, '.') == NULL && (cp = __hostalias (name)) != NULL)
+ if (strchr (name, '.') == NULL
+ && (cp = res_hostalias (&_res, name, tmp, sizeof (tmp))) != NULL)
name = cp;
n = res_nsearch (&_res, name, C_IN, type, host_buffer.buf,