summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/gethost.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/unix/gethost.c')
-rw-r--r--otherlibs/unix/gethost.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/otherlibs/unix/gethost.c b/otherlibs/unix/gethost.c
index b2c2c11c3..999cdc2ca 100644
--- a/otherlibs/unix/gethost.c
+++ b/otherlibs/unix/gethost.c
@@ -61,10 +61,8 @@ static value alloc_host_entry(entry)
value unix_gethostbyaddr(a) /* ML */
value a;
{
- struct in_addr in_addr;
struct hostent * entry;
- in_addr.s_addr = GET_INET_ADDR(a);
- entry = gethostbyaddr((char *) &in_addr, sizeof(in_addr), 0);
+ entry = gethostbyaddr((char *) &GET_INET_ADDR(a), 4, AF_INET);
if (entry == (struct hostent *) NULL) raise_not_found();
return alloc_host_entry(entry);
}