Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on FreeBSD: error[E0425]: cannot find value POLLRDHUP in crate libc #337

Open
yurivict opened this issue May 27, 2024 · 4 comments

Comments

@yurivict
Copy link

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

@landryb
Copy link

landryb commented Sep 11, 2024

same error seen on OpenBSD, fwiw

@jdm
Copy link
Member

jdm commented Sep 11, 2024

Ah, this will.be fixed when we release a new version that includes da28df9. You can use the main branch in the meantime.

@landryb
Copy link

landryb commented Sep 12, 2024

OpenBSD doesn't have that #define: https://github.com/openbsd/src/blob/master/sys/sys/poll.h#L39

@sagudev
Copy link
Member

sagudev commented Sep 12, 2024

I think we should push fix to lib for POLLRDHUPon freebsd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants