Correction de gethostbyaddr.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
ed8733aa76
commit
c5d9eb3192
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue