#include // for __syscall_0, syscall #include // for getgid, gid_t gid_t getgid(void) { return syscall(getgid); }