zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit aceb7e18bd1eb25affe8118e01e066c9e6bb0c04 (tree)
parent 537f9052167a683c922c9815eb9fdce5b0778dc2
Author: Jonathan Marler <johnnymarler@gmail.com>
Date:   Fri, 13 May 2022 08:52:06 -0600

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.

Diffstat:
Mlib/std/os/linux.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig @@ -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")) { return syscall2(.setgroups32, size, @ptrToInt(list)); } else {