diff --git a/crates/punktfunk-core/cbindgen.toml b/crates/punktfunk-core/cbindgen.toml index df7aa21..4bfbb53 100644 --- a/crates/punktfunk-core/cbindgen.toml +++ b/crates/punktfunk-core/cbindgen.toml @@ -12,6 +12,12 @@ documentation_style = "c99" [parse] parse_deps = false +[export] +# Internal Apple-only FFI (transport/udp.rs `recvmsg_x` batched recv + its `MsghdrX`) — NOT part of +# the C ABI. cbindgen otherwise sweeps the foreign import and its #[repr(C)] struct into the header, +# where socklen_t/ssize_t/iovec are undefined and the C harness fails to compile. +exclude = ["MsghdrX", "recvmsg_x"] + [export.rename] "InputEvent" = "PunktfunkInputEvent" "InputKind" = "PunktfunkInputKind" diff --git a/include/punktfunk_core.h b/include/punktfunk_core.h index 82d82db..cef501e 100644 --- a/include/punktfunk_core.h +++ b/include/punktfunk_core.h @@ -470,18 +470,6 @@ typedef struct { float loss_pct; } PunktfunkProbeResult; -// `struct msghdr_x` from Darwin `` (the batched-I/O variant — not in the `libc` crate). -typedef struct { - void *msg_name; - socklen_t msg_namelen; - iovec *msg_iov; - int msg_iovlen; - void *msg_control; - socklen_t msg_controllen; - int msg_flags; - size_t msg_datalen; -} MsghdrX; - #ifdef __cplusplus extern "C" { #endif // __cplusplus @@ -899,10 +887,6 @@ PunktfunkStatus punktfunk_connection_probe_result(const PunktfunkConnection *c, void punktfunk_connection_close(PunktfunkConnection *c); #endif -// Darwin batched receive: up to `cnt` datagrams in one syscall; returns the count received and -// sets each `msg_datalen` to its byte length. Present in libSystem on all macOS/iOS. -extern ssize_t recvmsg_x(int s, MsghdrX *msgp, unsigned int cnt, int flags); - #ifdef __cplusplus } // extern "C" #endif // __cplusplus