mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #7459 from Ecordonnier/eco/musl-utmpx
utmpx.rs: use correct constant names for musl libc
This commit is contained in:
commit
87ec8285c3
1 changed files with 12 additions and 0 deletions
|
@ -70,9 +70,21 @@ macro_rules! chars2string {
|
|||
mod ut {
|
||||
pub static DEFAULT_FILE: &str = "/var/run/utmp";
|
||||
|
||||
#[cfg(target_env = "musl")]
|
||||
pub use libc::UT_HOSTSIZE;
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
pub use libc::__UT_HOSTSIZE as UT_HOSTSIZE;
|
||||
|
||||
#[cfg(target_env = "musl")]
|
||||
pub use libc::UT_LINESIZE;
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
pub use libc::__UT_LINESIZE as UT_LINESIZE;
|
||||
|
||||
#[cfg(target_env = "musl")]
|
||||
pub use libc::UT_NAMESIZE;
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
pub use libc::__UT_NAMESIZE as UT_NAMESIZE;
|
||||
|
||||
pub const UT_IDSIZE: usize = 4;
|
||||
|
||||
pub use libc::ACCOUNTING;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue