summaryrefslogtreecommitdiff
path: root/libc/inet
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-03-20 18:37:00 +0000
committerEric Andersen <andersen@codepoet.org>2002-03-20 18:37:00 +0000
commit82032bb977fafb18f36d3ee91e91121a40d1799b (patch)
tree6fb91e6cc45b030cf2fea48c08ba2e9014035eda /libc/inet
parentafdb07f921dc68f88d588c14ba09dac343ebbc5c (diff)
Patch from Bart Visscher <magick@Linux-Fan.com> fixing some
missing pieces of the conversion to reentrant functions.
Diffstat (limited to 'libc/inet')
-rw-r--r--libc/inet/resolv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index ff2e918b7..29094541a 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -1027,7 +1027,7 @@ struct hostent *gethostbyname2(const char *name, int family)
256/*namebuffer*/ + 32/* margin */];
struct hostent *hp;
- gethostbyname_r(name, &h, buf, sizeof(buf), &hp, &h_errno);
+ gethostbyname2_r(name, family, &h, buf, sizeof(buf), &hp, &h_errno);
return hp;
#endif /* __UCLIBC_HAS_IPV6__ */
@@ -1620,6 +1620,7 @@ int gethostbyname_r(const char * name,
result_buf->h_addrtype = AF_INET;
result_buf->h_length = sizeof(*in);
result_buf->h_addr_list = (char **) addr_list;
+ *result=result_buf;
*h_errnop = NETDB_SUCCESS;
return NETDB_SUCCESS;
}
@@ -1753,6 +1754,7 @@ int gethostbyname2_r(const char *name, int family,
result_buf->h_addrtype = AF_INET6;
result_buf->h_length = sizeof(*in);
result_buf->h_addr_list = (char **) addr_list;
+ *result=result_buf;
*h_errnop = NETDB_SUCCESS;
return NETDB_SUCCESS;
}