Fails to build on NetBSD
Closed this issue · 3 comments
0323pin commented
Hi,
I use Alacritty
development branch as my terminal emulator, version 0.14.x
While it was using x11-clipboard
-0.8.1 there were no issues but, since it was bumped to 0.9.1, I'm no longer able to build it.
This is what I get from an attempt to build from the latest git-HEAD:
error[E0425]: cannot find function `eventfd` in crate `libc`
--> /usr/pkgsrc/wip/alacritty-dev/work/vendor/x11-clipboard-0.9.1/src/run.rs:37:34
|
37 | let event_fd_res = libc::eventfd(0, libc::EFD_CLOEXEC);
| ^^^^^^^ not found in `libc`
error[E0425]: cannot find value `EFD_CLOEXEC` in crate `libc`
--> /usr/pkgsrc/wip/alacritty-dev/work/vendor/x11-clipboard-0.9.1/src/run.rs:37:51
|
37 | let event_fd_res = libc::eventfd(0, libc::EFD_CLOEXEC);
| ^^^^^^^^^^^ help: a constant with a similar name exists: `FD_CLOEXEC`
|
::: /usr/pkgsrc/wip/alacritty-dev/work/vendor/libc-0.2.153/src/unix/mod.rs:225:9
|
225 | pub const FD_CLOEXEC: ::c_int = 0x1;
| ----------------------------- similarly named constant `FD_CLOEXEC` defined here
Patch replacing EFD_CLOEXEC
with FD_CLOEXEC
doesn't help and, I get:
error[E0425]: cannot find function `eventfd` in crate `libc`
--> /usr/pkgsrc/wip/alacritty-dev/work/vendor/x11-clipboard-0.9.1/src/run.rs:37:34
|
37 | let event_fd_res = libc::eventfd(0, libc::FD_CLOEXEC);
| ^^^^^^^ not found in `libc`
Help would be really appreciated.
Thanks!
quininer commented
Ah, unexpected compatibility issue, @MarcusGrass are you interested in fix it?
0323pin commented
Possibly restricting the use eventfd
to Linux only.
MarcusGrass commented
Ah, unexpected compatibility issue, @MarcusGrass are you interested in fix it?
Yeah, my bad, this could be done with a regular pipe, slightly uglier.