Skip to content

Commit 8e6f36c

Browse files
authored
Merge pull request #4524 from xingxue-ibm/add-getpeereid
Add function getpeereid for AIX
2 parents fd5ca76 + 336e3f1 commit 8e6f36c

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
@@ -5668,6 +5668,9 @@ fn test_aix(target: &str) {
56685668
// https://github.com/gnzlbg/ctest/issues/68.
56695669
"lio_listio" => true,
56705670

5671+
// The function is only available under macro _KERNEL in 'proto_uipc.h'.
5672+
"getpeereid" => true,
5673+
56715674
_ => false,
56725675
}
56735676
});

libc-test/semver/aix.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1987,6 +1987,7 @@ getmntent
19871987
getnameinfo
19881988
getopt
19891989
getpagesize
1990+
getpeereid
19901991
getpeername
19911992
getpgid
19921993
getpgrp

src/unix/aix/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2943,6 +2943,7 @@ extern "C" {
29432943
flags: c_int,
29442944
) -> c_int;
29452945
pub fn getpagesize() -> c_int;
2946+
pub fn getpeereid(socket: c_int, euid: *mut crate::uid_t, egid: *mut crate::gid_t) -> c_int;
29462947
pub fn getpriority(which: c_int, who: crate::id_t) -> c_int;
29472948
pub fn getpwent() -> *mut crate::passwd;
29482949
#[link_name = "_posix_getpwnam_r"]

0 commit comments

Comments
 (0)