Browse thread
ocamlnet: EAFNOSUPPORT on Max OSX
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Joel Reymont <joelr1@g...> |
| Subject: | Re: Mac OSX getsocketpair/getsockname and IPv6 |
There are no bugs in the OCaml FFI.
socketpair.c:
printf("unix_socketpair: domain = %d/%d/%d, type = %d/%d/%d, proto
= %d\n",
PF_UNIX,
Int_val(domain),
socket_domain_table[Int_val(domain)],
SOCK_STREAM,
Int_val(type),
socket_type_table[Int_val(type)],
Int_val(proto));
Running the test
#use "topfind";;
#require "unix";;
let x, y = Unix.socketpair Unix.PF_UNIX Unix.SOCK_STREAM 0;;
Unix.getpeername y;;
produces
unix_socketpair: domain = 1/0/1, type = 1/0/1, proto = 0
Exception: Unix.Unix_error (Unix.EAFNOSUPPORT, "", "").
So we _are_ passing the proper values and they become proper values
as well.
The problem must be somewhere else, possibly in getsockbyname.c.
Joel
--
http://wagerlabs.com/