1 /* vi: set sw=4 ts=4: */
3 * setfsgid() for uClibc
5 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
10 #include <sys/syscall.h>
11 #include <sys/fsuid.h>
12 #include <bits/wordsize.h>
14 #if (__WORDSIZE == 32 && defined(__NR_setfsgid32)) || __WORDSIZE == 64
15 # ifdef __NR_setfsgid32
17 # define __NR_setfsgid __NR_setfsgid32
20 _syscall1(int, setfsgid, gid_t, gid)
24 # define __NR___syscall_setfsgid __NR_setfsgid
25 static __inline__ _syscall1(int, __syscall_setfsgid, __kernel_gid_t, gid)
27 int setfsgid(gid_t gid)
29 if (gid != (gid_t) ((__kernel_gid_t) gid)) {
33 return (__syscall_setfsgid(gid));