Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Drepper committed Jul 10, 2000
1 parent 47a8162 commit f80f1a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
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.

2000-07-09 Mark Kettenis <kettenis@gnu.org>

* elf/rtld.c (dl_main): Move call to __libc_check_standard_fds...
Expand Down
4 changes: 3 additions & 1 deletion resolv/nss_dns/dns-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f80f1a4

Please sign in to comment.