summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-16 02:33:16 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:38 +0200
commit0a18b6589de2b9c9e3a6dbaf852d2931af6b34a4 (patch)
tree4fefdc63883fbb09f30810e0eb47bf8b87b8d48d /libc/sysdeps/linux/common
parent4e171958a17424ca70408ec92a5ca749c09f9b1e (diff)
setgroups.c: move around some headers, always_inline syscall
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/setgroups.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/common/setgroups.c b/libc/sysdeps/linux/common/setgroups.c
index 72c987837..d97859f0d 100644
--- a/libc/sysdeps/linux/common/setgroups.c
+++ b/libc/sysdeps/linux/common/setgroups.c
@@ -8,12 +8,9 @@
*/
#include <sys/syscall.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <grp.h>
#ifdef __USE_BSD
-
+#include <grp.h>
#if defined(__NR_setgroups32)
# undef __NR_setgroups
@@ -24,11 +21,14 @@ _syscall2(int, setgroups, size_t, size, const gid_t *, list)
_syscall2(int, setgroups, size_t, size, const gid_t *, list)
#else
+# include <errno.h>
+# include <stdlib.h>
+# include <unistd.h>
+# include <sys/types.h>
-
-#define __NR___syscall_setgroups __NR_setgroups
-static __inline__ _syscall2(int, __syscall_setgroups,
- size_t, size, const __kernel_gid_t *, list)
+# define __NR___syscall_setgroups __NR_setgroups
+static __always_inline _syscall2(int, __syscall_setgroups,
+ size_t, size, const __kernel_gid_t *, list)
int setgroups(size_t size, const gid_t *groups)
{