From 8e394e7ed51a2fcdd5088e1c8fcc8b5b8033eb85 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 8 Jul 2000 11:50:37 +1000 Subject: - (djm) Don't use inet_addr. --- ChangeLog | 1 + fake-getaddrinfo.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index be8ba3569..b2bef47c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ Baars, Henk - (djm) Handle EWOULDBLOCK returns from read() and write() in atomicio.c Fix from Marquess, Steve Mr JMLFDC + - (djm) Don't use inet_addr. 20000702 - (djm) Fix brace mismatch from Corinna Vinschen diff --git a/fake-getaddrinfo.c b/fake-getaddrinfo.c index b3af4aa2e..c9bc03a35 100644 --- a/fake-getaddrinfo.c +++ b/fake-getaddrinfo.c @@ -65,6 +65,7 @@ int getaddrinfo(const char *hostname, const char *servname, { struct addrinfo *cur, *prev = NULL; struct hostent *hp; + struct in_addr in; int i, port; if (servname) @@ -86,8 +87,8 @@ int getaddrinfo(const char *hostname, const char *servname, return EAI_MEMORY; } - if (inet_addr(hostname) != -1) { - if (NULL != (*res = malloc_ai(port, inet_addr(hostname)))) + if (inet_aton(hostname, &in) != -1) { + if (NULL != (*res = malloc_ai(port, in.s_addr))) return 0; else return EAI_MEMORY; -- cgit v1.2.3