diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-09-28 20:41:28 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-09-28 20:41:28 +0000 |
commit | 8006438996ba503957507974948c7673384b777c (patch) | |
tree | a1a2b6468f1d74f3ee8153dd002f976ad60c7e0c /libc/sysdeps/linux/common/setreuid.c | |
parent | 0a24932ab1ffc0ba5fc20f1c7f47b2620b22d080 (diff) |
implement support for the rest of the 32bit uid syscalls
Diffstat (limited to 'libc/sysdeps/linux/common/setreuid.c')
-rw-r--r-- | libc/sysdeps/linux/common/setreuid.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/setreuid.c b/libc/sysdeps/linux/common/setreuid.c index dcbe4adfe..acff36047 100644 --- a/libc/sysdeps/linux/common/setreuid.c +++ b/libc/sysdeps/linux/common/setreuid.c @@ -9,10 +9,21 @@ #include "syscalls.h" #include <unistd.h> +#include <bits/wordsize.h> libc_hidden_proto(setreuid) -#define __NR___syscall_setreuid __NR_setreuid +#if (__WORDSIZE == 32 && defined(__NR_setreuid32)) || __WORDSIZE == 64 +# ifdef __NR_setreuid32 +# undef __NR_setreuid +# define __NR_setreuid __NR_setreuid32 +# endif + +_syscall2(int, setreuid, uid_t, ruid, uid_t, euid); + +#else + +# define __NR___syscall_setreuid __NR_setreuid static inline _syscall2(int, __syscall_setreuid, __kernel_uid_t, ruid, __kernel_uid_t, euid); @@ -25,4 +36,6 @@ int setreuid(uid_t ruid, uid_t euid) } return (__syscall_setreuid(ruid, euid)); } +#endif + libc_hidden_def(setreuid) |