Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utmpx api for linux musl + musl few build fixes. #3213

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -617,12 +617,12 @@ dlinfo
dlmopen
endutxent
explicit_bzero
fgetgrent_r
fgetspent_r
futimes
getauxval
getentropy
getgrent_r
fgetgrent_r
getloadavg
getpt
getpwent_r
Expand Down
18 changes: 12 additions & 6 deletions libc-test/semver/linux-musl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,22 @@ aio_return
aio_suspend
aio_write
aiocb
asctime_r
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 @@ -71,14 +80,11 @@ prlimit
prlimit64
process_vm_readv
process_vm_writev
pututxline
pwritev64
reallocarray
timex
euidaccess
eaccess
asctime_r
setutxent
strftime
strftime_l
strptime
dirname
basename
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 @@ -900,6 +900,13 @@ extern "C" {

pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;

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();
Comment on lines +904 to +909
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, we can merge non-breaking changes like this.

}

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