Found using
https://github.com/NetBSD/src/blob/trunk/tests/lib/libc/sys/t_getgroups.c
getgroups/setgroups want an int and therefore casting it to u_int
resulted in getgroups(-1, ...) not returning -1 / errno = EINVAL.
imp@ updated syscall.master, without which this change would be a nop.
PR: 189941
Tested by: imp@