From c7dec4ce777a04faffdc5f36500474118f854550 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 10 Feb 2006 04:15:23 +0000 Subject: add support for newer [sg]etgroups function and make the function a simple passthrough on 64bit arches (should fix the getgroup crashes in ltp) --- libc/sysdeps/linux/common/getgroups.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/common/getgroups.c') diff --git a/libc/sysdeps/linux/common/getgroups.c b/libc/sysdeps/linux/common/getgroups.c index a922b7cd6..6903ed14f 100644 --- a/libc/sysdeps/linux/common/getgroups.c +++ b/libc/sysdeps/linux/common/getgroups.c @@ -14,8 +14,17 @@ libc_hidden_proto(getgroups) -libc_hidden_proto(sysconf) +#if defined(__NR_getgroups32) +# undef __NR_getgroups +# define __NR_getgroups __NR_getgroups32 +_syscall2(int, getgroups, int, size, gid_t *, list); + +#elif __WORDSIZE == 64 +_syscall2(int, getgroups, int, size, gid_t *, list); + +#else +libc_hidden_proto(sysconf) #define MIN(a,b) (((a)<(b))?(a):(b)) #define __NR___syscall_getgroups __NR_getgroups @@ -49,4 +58,6 @@ ret_error: return ngids; } } +#endif + libc_hidden_def(getgroups) -- cgit v1.2.3