ipc-channel
ipc-channel copied to clipboard
Build fails on FreeBSD: error[E0425]: cannot find value `POLLRDHUP` in crate `libc`
rror[E0425]: cannot find value `POLLRDHUP` in crate `libc`
--> /home/yuri/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ipc-channel-0.18.0/src/platform/unix/mod.rs:1162:67
|
1162 | let events = libc::POLLIN | libc::POLLPRI | libc::POLLRDHUP;
| ^^^^^^^^^ help: a constant with a similar name exists: `POLLHUP`
|
::: /home/yuri/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.153/src/unix/bsd/mod.rs:477:1
|
477 | pub const POLLHUP: ::c_short = 0x10;
| ---------------------------- similarly named constant `POLLHUP` defined here
error[E0308]: mismatched types
--> /home/yuri/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ipc-channel-0.18.0/src/platform/unix/mod.rs:1170:21
|
1168 | let result = libc::poll(
| ---------- arguments to this function are incorrect
1169 | fd.as_mut_ptr(),
1170 | fd.len() as libc::c_ulong,
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u64`
Version: 0.18.0 FreeBSD 14.0
same error seen on OpenBSD, fwiw
Ah, this will.be fixed when we release a new version that includes https://github.com/servo/ipc-channel/commit/da28df996c22c5b72f95a4bb594689943fc3c7f5. You can use the main branch in the meantime.
OpenBSD doesn't have that #define: https://github.com/openbsd/src/blob/master/sys/sys/poll.h#L39
I think we should push fix to lib for POLLRDHUPon freebsd.