mirror of
https://github.com/ziglang/zig.git
synced 2024-11-16 09:03:12 +00:00
std.os.linux: fix signature of setgroups
the list parameter should be a multi-item pointer rather than a single-item pointer. see: https://linux.die.net/man/2/setgroups > setgroups() sets the supplementary group IDs for the calling process... > the size argument specifies the number of supplementary group IDs in the buffer pointed to by list.
This commit is contained in:
parent
537f905216
commit
aceb7e18bd
@ -1051,7 +1051,7 @@ pub fn getgroups(size: usize, list: *gid_t) usize {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn setgroups(size: usize, list: *const gid_t) usize {
|
pub fn setgroups(size: usize, list: [*]const gid_t) usize {
|
||||||
if (@hasField(SYS, "setgroups32")) {
|
if (@hasField(SYS, "setgroups32")) {
|
||||||
return syscall2(.setgroups32, size, @ptrToInt(list));
|
return syscall2(.setgroups32, size, @ptrToInt(list));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user