Skip to content

Commit

Permalink
utmpx api for linux musl.
Browse files Browse the repository at this point in the history
close rust-lang#3190

(backport <rust-lang#3213>)
(cherry picked from commit e3caaf6)
  • Loading branch information
devnexen authored and tgross35 committed Nov 17, 2024
1 parent 8e55d58 commit 05091c3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,26 @@ aio_suspend
aio_write
aiocb
asctime_r
asctime_r
basename
basename
clock_adjtime
copy_file_range
ctermid
dirname
dirname
eaccess
eaccess
endutxent
euidaccess
euidaccess
explicit_bzero
futimes
getauxval
getloadavg
getutxent
getutxid
getutxline
lio_listio
ntptimeval
open_wmemstream
Expand All @@ -94,8 +103,13 @@ prlimit
prlimit64
process_vm_readv
process_vm_writev
pututxline
pwritev2
pwritev64
reallocarray
setutxent
strftime
strftime_l
strptime
tcp_info
timex
7 changes: 7 additions & 0 deletions src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,13 @@ extern "C" {
actions: *mut ::posix_spawn_file_actions_t,
fd: ::c_int,
) -> ::c_int;

pub fn getutxent() -> *mut utmpx;
pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
pub fn setutxent();
pub fn endutxent();
}

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

0 comments on commit 05091c3

Please sign in to comment.