Skip to content

Commit 21bf054

Browse files
committed
Auto merge of #482 - MrFloya:initgroups, r=alexcrichton
Added initgroups Not sure whether this is the correct platform level. I'll wait for CI to find out.. EDIT: Okay now it builds on all platforms but I think this configuration does not add the function on BSD where it has the same signature as on Linux.
2 parents 6a4601f + 2355bc5 commit 21bf054

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,8 @@ extern {
15301530
linkpath: *const ::c_char) -> ::c_int;
15311531
pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
15321532
flags: ::c_int) -> ::c_int;
1533+
1534+
pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int;
15331535
}
15341536

15351537
cfg_if! {

src/unix/notbsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ extern {
738738
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
739739
pub fn setgroups(ngroups: ::size_t,
740740
ptr: *const ::gid_t) -> ::c_int;
741+
pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
741742
pub fn sched_setscheduler(pid: ::pid_t,
742743
policy: ::c_int,
743744
param: *const sched_param) -> ::c_int;

0 commit comments

Comments
 (0)