- (djm) Don't use inet_addr.
This commit is contained in:
parent
f2fdbe5540
commit
8e394e7ed5
|
@ -7,6 +7,7 @@
|
||||||
Baars, Henk <Hendrik.Baars@nl.origin-it.com>
|
Baars, Henk <Hendrik.Baars@nl.origin-it.com>
|
||||||
- (djm) Handle EWOULDBLOCK returns from read() and write() in atomicio.c
|
- (djm) Handle EWOULDBLOCK returns from read() and write() in atomicio.c
|
||||||
Fix from Marquess, Steve Mr JMLFDC <Steve.Marquess@DET.AMEDD.ARMY.MIL>
|
Fix from Marquess, Steve Mr JMLFDC <Steve.Marquess@DET.AMEDD.ARMY.MIL>
|
||||||
|
- (djm) Don't use inet_addr.
|
||||||
|
|
||||||
20000702
|
20000702
|
||||||
- (djm) Fix brace mismatch from Corinna Vinschen <vinschen@cygnus.com>
|
- (djm) Fix brace mismatch from Corinna Vinschen <vinschen@cygnus.com>
|
||||||
|
|
|
@ -65,6 +65,7 @@ int getaddrinfo(const char *hostname, const char *servname,
|
||||||
{
|
{
|
||||||
struct addrinfo *cur, *prev = NULL;
|
struct addrinfo *cur, *prev = NULL;
|
||||||
struct hostent *hp;
|
struct hostent *hp;
|
||||||
|
struct in_addr in;
|
||||||
int i, port;
|
int i, port;
|
||||||
|
|
||||||
if (servname)
|
if (servname)
|
||||||
|
@ -86,8 +87,8 @@ int getaddrinfo(const char *hostname, const char *servname,
|
||||||
return EAI_MEMORY;
|
return EAI_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inet_addr(hostname) != -1) {
|
if (inet_aton(hostname, &in) != -1) {
|
||||||
if (NULL != (*res = malloc_ai(port, inet_addr(hostname))))
|
if (NULL != (*res = malloc_ai(port, in.s_addr)))
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return EAI_MEMORY;
|
return EAI_MEMORY;
|
||||||
|
|
Loading…
Reference in New Issue