diff --git a/src/uu/pinky/src/pinky.rs b/src/uu/pinky/src/pinky.rs index 8630a9700..8246f8655 100644 --- a/src/uu/pinky/src/pinky.rs +++ b/src/uu/pinky/src/pinky.rs @@ -10,7 +10,18 @@ use uucore::{format_usage, help_about, help_usage}; mod platform; +#[cfg(target_env = "musl")] +const ABOUT: &str = concat!( + help_about!("pinky.md"), + "\n\nWarning: When built with musl libc, the `pinky` utility may show incomplete \n", + "or missing user information due to musl's stub implementation of `utmpx` \n", + "functions. This limitation affects the ability to retrieve accurate details \n", + "about logged-in users." +); + +#[cfg(not(target_env = "musl"))] const ABOUT: &str = help_about!("pinky.md"); + const USAGE: &str = help_usage!("pinky.md"); mod options { diff --git a/src/uu/uptime/src/uptime.rs b/src/uu/uptime/src/uptime.rs index 2508e5196..fe655c4d8 100644 --- a/src/uu/uptime/src/uptime.rs +++ b/src/uu/uptime/src/uptime.rs @@ -23,7 +23,17 @@ use uucore::{format_usage, help_about, help_usage}; #[cfg(not(target_os = "openbsd"))] use uucore::utmpx::*; +#[cfg(target_env = "musl")] +const ABOUT: &str = concat!( + help_about!("uptime.md"), + "\n\nWarning: When built with musl libc, the `uptime` utility may show '0 users' \n", + "due to musl's stub implementation of utmpx functions. Boot time and load averages \n", + "are still calculated using alternative mechanisms." +); + +#[cfg(not(target_env = "musl"))] const ABOUT: &str = help_about!("uptime.md"); + const USAGE: &str = help_usage!("uptime.md"); pub mod options { pub static SINCE: &str = "since"; diff --git a/src/uu/users/src/users.rs b/src/uu/users/src/users.rs index 3ca4b26f5..192ed0b57 100644 --- a/src/uu/users/src/users.rs +++ b/src/uu/users/src/users.rs @@ -18,7 +18,16 @@ use utmp_classic::{UtmpEntry, parse_from_path}; #[cfg(not(target_os = "openbsd"))] use uucore::utmpx::{self, Utmpx}; +#[cfg(target_env = "musl")] +const ABOUT: &str = concat!( + help_about!("users.md"), + "\n\nWarning: When built with musl libc, the `users` utility may show '0 users' \n", + "due to musl's stub implementation of utmpx functions." +); + +#[cfg(not(target_env = "musl"))] const ABOUT: &str = help_about!("users.md"); + const USAGE: &str = help_usage!("users.md"); #[cfg(target_os = "openbsd")] diff --git a/src/uu/who/src/who.rs b/src/uu/who/src/who.rs index ecbc9da3b..2203bbbd1 100644 --- a/src/uu/who/src/who.rs +++ b/src/uu/who/src/who.rs @@ -28,7 +28,17 @@ mod options { pub const FILE: &str = "FILE"; // if length=1: FILE, if length=2: ARG1 ARG2 } +#[cfg(target_env = "musl")] +const ABOUT: &str = concat!( + help_about!("who.md"), + "\n\nNote: When built with musl libc, the `who` utility will not display any \n", + "information about logged-in users. This is due to musl's stub implementation \n", + "of `utmpx` functions, which prevents access to the necessary data." +); + +#[cfg(not(target_env = "musl"))] const ABOUT: &str = help_about!("who.md"); + const USAGE: &str = help_usage!("who.md"); #[cfg(target_os = "linux")]