Skip to content

Commit 1a494b5

Browse files
Xing Xuetgross35
authored andcommitted
Add function getpeereid.
(backport <#4524>) (cherry picked from commit 336e3f1)
1 parent a447c3b commit 1a494b5

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5729,6 +5729,9 @@ fn test_aix(target: &str) {
57295729
// https://github.com/gnzlbg/ctest/issues/68.
57305730
"lio_listio" => true,
57315731

5732+
// The function is only available under macro _KERNEL in 'proto_uipc.h'.
5733+
"getpeereid" => true,
5734+
57325735
_ => false,
57335736
}
57345737
});

libc-test/semver/aix.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,6 +1989,7 @@ getmntent
19891989
getnameinfo
19901990
getopt
19911991
getpagesize
1992+
getpeereid
19921993
getpeername
19931994
getpgid
19941995
getpgrp

src/unix/aix/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2949,6 +2949,7 @@ extern "C" {
29492949
flags: c_int,
29502950
) -> c_int;
29512951
pub fn getpagesize() -> c_int;
2952+
pub fn getpeereid(socket: c_int, euid: *mut crate::uid_t, egid: *mut crate::gid_t) -> c_int;
29522953
pub fn getpriority(which: c_int, who: crate::id_t) -> c_int;
29532954
pub fn getpwent() -> *mut crate::passwd;
29542955
#[link_name = "_posix_getpwnam_r"]

0 commit comments

Comments
 (0)