Skip to content

Commit 4e85457

Browse files
committed
Auto merge of #2428 - GrayJack:haiku-getgrouplist, r=JohnTitor
Haiku: Add getgrouplist function Haiku actually does expose `getgrouplist` function to their public C API. You can see it in their [headers files](https://github.com/haiku/haiku/blob/8f16317a5b6db5c672f331814273e5857555020f/headers/posix/unistd.h#L275) > P.S. I'm participating in [Hacktoberfest 2021](https://hacktoberfest.digitalocean.com/). If this PR is up to standard and merged, I'd appreciate if the `hacktoberfest-accepted` label could be added. Thanks!
2 parents 3b195de + c095cbc commit 4e85457

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/unix/haiku/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,6 +1510,12 @@ extern "C" {
15101510
buflen: ::size_t,
15111511
result: *mut *mut ::group,
15121512
) -> ::c_int;
1513+
pub fn getgrouplist(
1514+
user: *const ::c_char,
1515+
basegroup: ::gid_t,
1516+
grouplist: *mut ::gid_t,
1517+
groupcount: *mut ::c_int,
1518+
) -> ::c_int;
15131519
pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int;
15141520
pub fn sem_close(sem: *mut sem_t) -> ::c_int;
15151521
pub fn getdtablesize() -> ::c_int;

0 commit comments

Comments
 (0)