From 8006438996ba503957507974948c7673384b777c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 28 Sep 2006 20:41:28 +0000 Subject: implement support for the rest of the 32bit uid syscalls --- libc/sysdeps/linux/common/setregid.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/common/setregid.c') diff --git a/libc/sysdeps/linux/common/setregid.c b/libc/sysdeps/linux/common/setregid.c index a085ed2ab..b37a888e9 100644 --- a/libc/sysdeps/linux/common/setregid.c +++ b/libc/sysdeps/linux/common/setregid.c @@ -9,10 +9,21 @@ #include "syscalls.h" #include +#include libc_hidden_proto(setregid) -#define __NR___syscall_setregid __NR_setregid +#if (__WORDSIZE == 32 && defined(__NR_setregid32)) || __WORDSIZE == 64 +# ifdef __NR_setregid32 +# undef __NR_setregid +# define __NR_setregid __NR_setregid32 +# endif + +_syscall2(int, setregid, gid_t, rgid, gid_t, egid); + +#else + +# define __NR___syscall_setregid __NR_setregid static inline _syscall2(int, __syscall_setregid, __kernel_gid_t, rgid, __kernel_gid_t, egid); @@ -25,4 +36,6 @@ int setregid(gid_t rgid, gid_t egid) } return (__syscall_setregid(rgid, egid)); } +#endif + libc_hidden_def(setregid) -- cgit v1.2.3