1
Fork 0
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:
Sylvestre Ledru 2025-03-16 10:02:41 +01:00 committed by GitHub
commit 87ec8285c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;