summaryrefslogtreecommitdiffstats
path: root/otherlibs/unix/gethost.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>1996-02-26 17:50:19 +0000
committerXavier Leroy <xavier.leroy@inria.fr>1996-02-26 17:50:19 +0000
commitc5d9eb31927535e4f4ddcd6323ee0453d8d57ced (patch)
tree0ce61dd2923f17ab17aaf98e8d4fb68d379b81f8 /otherlibs/unix/gethost.c
parented8733aa76ea7f43762733d89e3d7223456a6992 (diff)
Correction de gethostbyaddr.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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);
}