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 870f096
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,15 @@ 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 +98,10 @@ prlimit
prlimit64
process_vm_readv
process_vm_writev
pututxline
pwritev2
pwritev64
reallocarray
setutxent
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 870f096

Please sign in to comment.