summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/setgroups.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-10 04:15:23 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-10 04:15:23 +0000
commitc7dec4ce777a04faffdc5f36500474118f854550 (patch)
tree23f576b5d1f3282e407e2d551d2d9700e6b3d074 /libc/sysdeps/linux/common/setgroups.c
parent0ebdd0e14d638c32cfc62d8dd959ccea9e25bfd2 (diff)
add support for newer [sg]etgroups function and make the function a simple passthrough on 64bit arches (should fix the getgroup crashes in ltp)
Diffstat (limited to 'libc/sysdeps/linux/common/setgroups.c')
-rw-r--r--libc/sysdeps/linux/common/setgroups.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/setgroups.c b/libc/sysdeps/linux/common/setgroups.c
index b767f6aa7..dd1a03f38 100644
--- a/libc/sysdeps/linux/common/setgroups.c
+++ b/libc/sysdeps/linux/common/setgroups.c
@@ -14,6 +14,16 @@
libc_hidden_proto(setgroups)
+#if defined(__NR_setgroups32)
+# undef __NR_setgroups
+# define __NR_setgroups __NR_setgroups32
+_syscall2(int, setgroups, size_t, size, const gid_t *, list);
+
+#elif __WORDSIZE == 64
+_syscall2(int, setgroups, size_t, size, const gid_t *, list);
+
+#else
+
libc_hidden_proto(sysconf)
#define __NR___syscall_setgroups __NR_setgroups
@@ -49,4 +59,6 @@ ret_error:
return i;
}
}
+#endif
+
libc_hidden_def(setgroups)