fix(abi): exclude internal Apple recvmsg_x FFI from the C header
ci / web (push) Failing after 46s
apple / swift (push) Successful in 1m17s
ci / docs-site (push) Failing after 32s
ci / rust (push) Successful in 1m20s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 5s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 5s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
deb / build-publish (push) Successful in 3m16s
docker / deploy-docs (push) Successful in 18s
rpm / build-publish (push) Successful in 4m43s

cbindgen swept transport/udp.rs's `recvmsg_x` foreign import and its `MsghdrX`
#[repr(C)] struct into the generated C header — they're internal Apple-only FFI,
not part of the public C ABI, and reference socklen_t/ssize_t/iovec which the C
ABI harness doesn't include, so c_abi_harness_round_trips failed to compile.
Add them to cbindgen.toml export.exclude and regenerate the header.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-13 09:44:03 +00:00
parent f9b857aac2
commit 4098b252bc
2 changed files with 6 additions and 16 deletions
-16
View File
@@ -470,18 +470,6 @@ typedef struct {
float loss_pct;
} PunktfunkProbeResult;
// `struct msghdr_x` from Darwin `<sys/socket.h>` (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