Skip to content

Commit 8f26ab6

Browse files
committed
Add missing utmpx apis for linux musl
Close rust-lang#4322 Signed-off-by: Etienne Cordonnier <[email protected]>
1 parent c6a3cd6 commit 8f26ab6

File tree

1 file changed

+6
-1
lines changed
  • src/unix/linux_like/linux/musl

1 file changed

+6
-1
lines changed

src/unix/linux_like/linux/musl/mod.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ pub const INIT_PROCESS: c_short = 5;
656656
pub const LOGIN_PROCESS: c_short = 6;
657657
pub const USER_PROCESS: c_short = 7;
658658
pub const DEAD_PROCESS: c_short = 8;
659-
// musl does not define ACCOUNTING
659+
pub const ACCOUNTING: c_short = 9;
660660

661661
pub const SFD_CLOEXEC: c_int = 0x080000;
662662

@@ -888,6 +888,10 @@ pub const _CS_V7_ENV: c_int = 1149;
888888

889889
pub const CLONE_NEWTIME: c_int = 0x80;
890890

891+
pub const __UT_HOSTSIZE: usize = 256;
892+
pub const __UT_LINESIZE: usize = 32;
893+
pub const __UT_NAMESIZE: usize = 32;
894+
891895
cfg_if! {
892896
if #[cfg(target_arch = "s390x")] {
893897
pub const POSIX_FADV_DONTNEED: c_int = 6;
@@ -990,6 +994,7 @@ extern "C" {
990994
pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
991995
pub fn setutxent();
992996
pub fn endutxent();
997+
pub fn utmpxname(file: *const c_char) -> c_int;
993998
}
994999

9951000
// Alias <foo> to <foo>64 to mimic glibc's LFS64 support

0 commit comments

Comments
 (0)