Oubli d'un htons
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
e3ffb7372b
commit
119e00e58a
|
@ -58,7 +58,7 @@ value unix_getservbyname(value name, value proto) /* ML */
|
|||
value unix_getservbyport(value port, value proto) /* ML */
|
||||
{
|
||||
struct servent * entry;
|
||||
entry = getservbyport(Int_val(port), String_val(proto));
|
||||
entry = getservbyport(htons(Int_val(port)), String_val(proto));
|
||||
if (entry == (struct servent *) NULL) raise_not_found();
|
||||
return alloc_service_entry(entry);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue