diff --git a/crates/punktfunk-core/Cargo.toml b/crates/punktfunk-core/Cargo.toml index 5f7390a..35422e0 100644 --- a/crates/punktfunk-core/Cargo.toml +++ b/crates/punktfunk-core/Cargo.toml @@ -46,9 +46,12 @@ hmac = { version = "0.12", optional = true } spake2 = { version = "0.4", optional = true } tokio = { version = "1", optional = true, features = ["rt-multi-thread", "net", "sync", "macros"] } -# `sendmmsg` batched UDP send (the 1 Gbps+ syscall lever) — Linux only; other targets use the -# scalar `send` loop fallback. -[target.'cfg(target_os = "linux")'.dependencies] +# `libc` for batched UDP syscalls: `sendmmsg`/`recvmmsg` on Linux (the 1 Gbps+ lever) and the +# `recv(MSG_DONTWAIT)` drain on the other unix (Apple/BSD) targets, which have no `recvmmsg` +# (see transport/udp.rs `recv_batch`). Needed on every unix target — non-unix (Windows) uses +# the scalar fallbacks. Cross-compiles (iOS/tvOS) don't pull libc transitively the way the +# macOS host build does, so it must be a direct dep here or those slices fail to link `libc::`. +[target.'cfg(unix)'.dependencies] libc = "0.2" [dev-dependencies]