Skip to content

Commit e3caaf6

Browse files
committed
utmpx api for linux musl.
close #3190
1 parent f05d6a3 commit e3caaf6

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

libc-test/semver/linux-gnu.txt

+1-1
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

+12-6
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

+7
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,13 @@ extern "C" {
900900

901901
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char;
902902
pub fn basename(path: *mut ::c_char) -> *mut ::c_char;
903+
904+
pub fn getutxent() -> *mut utmpx;
905+
pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
906+
pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
907+
pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
908+
pub fn setutxent();
909+
pub fn endutxent();
903910
}
904911

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

0 commit comments

Comments
 (0)