Closed
Description
on openbsd 7.4 trying to build the nix
crate reboot feature. missing a bunch of stuff from libc. https://man.openbsd.org/reboot.2
can it be added please for amd64?
error[E0425]: cannot find value `RB_HALT_SYSTEM` in crate `libc`
--> /nix/src/sys/reboot.rs:17:9
|
17 | RB_HALT_SYSTEM,
| ^^^^^^^^^^^^^^ not found in `libc`
|
help: consider importing this unit variant
|
3 + use crate::sys::reboot::RebootMode::RB_HALT_SYSTEM;
|
error[E0425]: cannot find value `RB_KEXEC` in crate `libc`
--> /nix/src/sys/reboot.rs:20:9
|
20 | RB_KEXEC,
| ^^^^^^^^ not found in `libc`
|
help: consider importing this unit variant
|
3 + use crate::sys::reboot::RebootMode::RB_KEXEC;
|
error[E0425]: cannot find value `RB_POWER_OFF` in crate `libc`
--> /nix/src/sys/reboot.rs:22:9
|
22 | RB_POWER_OFF,
| ^^^^^^^^^^^^ not found in `libc`
|
help: consider importing this unit variant
|
3 + use crate::sys::reboot::RebootMode::RB_POWER_OFF;
|
error[E0425]: cannot find value `RB_AUTOBOOT` in crate `libc`
--> /nix/src/sys/reboot.rs:24:9
|
24 | RB_AUTOBOOT,
| ^^^^^^^^^^^ not found in `libc`
|
help: consider importing this unit variant
|
3 + use crate::sys::reboot::RebootMode::RB_AUTOBOOT;
|
error[E0425]: cannot find value `RB_SW_SUSPEND` in crate `libc`
--> /nix/src/sys/reboot.rs:27:9
|
27 | RB_SW_SUSPEND,
| ^^^^^^^^^^^^^ not found in `libc`
|
help: consider importing this unit variant
|
3 + use crate::sys::reboot::RebootMode::RB_SW_SUSPEND;
|
error[E0425]: cannot find function `reboot` in crate `libc`
--> /nix/src/sys/reboot.rs:33:20
|
33 | unsafe { libc::reboot(how as libc::c_int) };
| ^^^^^^ not found in `libc`
error[E0425]: cannot find value `RB_ENABLE_CAD` in crate `libc`
--> /nix/src/sys/reboot.rs:42:15
|
42 | libc::RB_ENABLE_CAD
| ^^^^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find value `RB_DISABLE_CAD` in crate `libc`
--> /nix/src/sys/reboot.rs:44:15
|
44 | libc::RB_DISABLE_CAD
| ^^^^^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `reboot` in crate `libc`
--> /nix/src/sys/reboot.rs:46:30
|
46 | let res = unsafe { libc::reboot(cmd) };
| ^^^^^^ not found in `libc`
For more information about this error, try `rustc --explain E0425`.
error: could not compile `nix` (lib) due to 9 previous errors