Skip to content

Commit

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

(backport <#3213>)
(cherry picked from commit e3caaf6)
  • Loading branch information
devnexen authored and tgross35 committed Nov 17, 2024
1 parent 8e55d58 commit 5c5007f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,23 @@ aio_suspend
aio_write
aiocb
asctime_r
asctime_r
basename
basename
clock_adjtime
copy_file_range
ctermid
dirname
eaccess
endutxent
euidaccess
explicit_bzero
futimes
getauxval
getloadavg
getutxent
getutxid
getutxline
lio_listio
ntptimeval
open_wmemstream
Expand All @@ -94,8 +100,11 @@ prlimit
prlimit64
process_vm_readv
process_vm_writev
pututxline
pwritev2
pwritev64
reallocarray
setutxent
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 5c5007f

Please sign in to comment.