Skip to content

Commit 28ef7fe

Browse files
committed
Auto merge of #3213 - devnexen:utmpx_linux_musl, r=JohnTitor
utmpx api for linux musl + musl few build fixes. close #3190
2 parents 7412a8b + e3caaf6 commit 28ef7fe

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

libc-test/semver/linux-gnu.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,12 +617,12 @@ dlinfo
617617
dlmopen
618618
endutxent
619619
explicit_bzero
620+
fgetgrent_r
620621
fgetspent_r
621622
futimes
622623
getauxval
623624
getentropy
624625
getgrent_r
625-
fgetgrent_r
626626
getloadavg
627627
getpt
628628
getpwent_r

libc-test/semver/linux-musl.txt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,22 @@ aio_return
5656
aio_suspend
5757
aio_write
5858
aiocb
59+
asctime_r
60+
basename
5961
clock_adjtime
6062
copy_file_range
6163
ctermid
64+
dirname
65+
eaccess
66+
endutxent
67+
euidaccess
6268
explicit_bzero
6369
futimes
6470
getauxval
6571
getloadavg
72+
getutxent
73+
getutxid
74+
getutxline
6675
lio_listio
6776
ntptimeval
6877
open_wmemstream
@@ -71,14 +80,11 @@ prlimit
7180
prlimit64
7281
process_vm_readv
7382
process_vm_writev
83+
pututxline
7484
pwritev64
7585
reallocarray
76-
timex
77-
euidaccess
78-
eaccess
79-
asctime_r
86+
setutxent
8087
strftime
8188
strftime_l
8289
strptime
83-
dirname
84-
basename
90+
timex

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,13 @@ extern "C" {
896896

897897
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
898898
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
899+
900+
pub fn getutxent() -> *mut utmpx;
901+
pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
902+
pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
903+
pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
904+
pub fn setutxent();
905+
pub fn endutxent();
899906
}
900907

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

0 commit comments

Comments
 (0)