#include // for __syscall_3, syscall #include // for gid_t, setegid int setegid(gid_t gid) { return syscall(setresgid, -1, gid, -1); }