mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
enable utmpx feature for musl
bump libc to 0.2.172 musl provides stubs of utmpx functions, and those stubs are available in the libc crate version 0.2.172. Thus let's enable the feature so that it can compile with musl. Note that those stubs always return a success exit value, and commands such as "users" will report an empty list of users, when calling those stubs. This is consistent with the behavior of GNU coreutils which does the same thing. The coreutils utillities using utmpx are "pinky", "uptime", "users", "who". This is the expected behavior when using those utilities compiled with those musl utmpx stubs: ``` root@qemuarm64:~# users root@qemuarm64:~# echo $? 0 root@qemuarm64:~# pinky Login Name TTY Idle When Where root@qemuarm64:~# echo $? 0 root@qemuarm64:~# uptime 12:58:47 up 0 min, 0 users, load average: 0.07, 0.02, 0.00 root@qemuarm64:~# echo $? 0 root@qemuarm64:~# who root@qemuarm64:~# echo $? 0 ``` Closes #1361 Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
This commit is contained in:
parent
1f133c50fb
commit
f0440ae85f
3 changed files with 2 additions and 3 deletions
|
@ -178,6 +178,7 @@ feat_os_unix_musl = [
|
|||
"feat_require_crate_cpp",
|
||||
"feat_require_unix",
|
||||
"feat_require_unix_hostid",
|
||||
"feat_require_unix_utmpx",
|
||||
]
|
||||
feat_os_unix_android = [
|
||||
"feat_Tier1",
|
||||
|
@ -308,7 +309,7 @@ hostname = "0.4"
|
|||
iana-time-zone = "0.1.57"
|
||||
indicatif = "0.17.8"
|
||||
itertools = "0.14.0"
|
||||
libc = "0.2.153"
|
||||
libc = "0.2.172"
|
||||
linux-raw-sys = "0.9"
|
||||
lscolors = { version = "0.20.0", default-features = false, features = [
|
||||
"gnu_legacy",
|
||||
|
|
|
@ -76,7 +76,6 @@ pub mod signals;
|
|||
not(target_os = "fuchsia"),
|
||||
not(target_os = "openbsd"),
|
||||
not(target_os = "redox"),
|
||||
not(target_env = "musl"),
|
||||
feature = "utmpx"
|
||||
))]
|
||||
pub mod utmpx;
|
||||
|
|
|
@ -89,7 +89,6 @@ pub use crate::features::signals;
|
|||
not(target_os = "fuchsia"),
|
||||
not(target_os = "openbsd"),
|
||||
not(target_os = "redox"),
|
||||
not(target_env = "musl"),
|
||||
feature = "utmpx"
|
||||
))]
|
||||
pub use crate::features::utmpx;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue