Correction de gethostbyaddr.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 1996-02-26 17:50:19 +00:00
parent ed8733aa76
commit c5d9eb3192
1 changed files with 1 additions and 3 deletions

View File

@ -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);
}