diff options
| author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-07-09 16:47:01 +0000 |
|---|---|---|
| committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-07-09 16:47:01 +0000 |
| commit | 62a21af8006ab04282fdc354c5b4dc765f56d058 (patch) | |
| tree | 568761d58289238aa14cced3f0010809d4d28c00 /libc/sysdeps/linux/common/setreuid.c | |
| parent | ef250238dc1572caf859c2b64652f9cdfb0d9e42 (diff) | |
| download | uClibc-alpine-62a21af8006ab04282fdc354c5b4dc765f56d058.tar.bz2 uClibc-alpine-62a21af8006ab04282fdc354c5b4dc765f56d058.tar.xz | |
BIG BIG commit: all left files merged from trunk [rev 22714]. Currenntly NPTL sh4 port build and work fine. All committed to allow Khem Ray working on a working branch to integrate the ARM nptl port. MIPS nptl port not tested but should still building and working fine. There are some other part non yet merged with trunk (misc/internals and some headers file that need some more work). Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/sysdeps/linux/common/setreuid.c')
| -rw-r--r-- | libc/sysdeps/linux/common/setreuid.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/setreuid.c b/libc/sysdeps/linux/common/setreuid.c index dcbe4adfe..7f908a333 100644 --- a/libc/sysdeps/linux/common/setreuid.c +++ b/libc/sysdeps/linux/common/setreuid.c @@ -7,12 +7,23 @@ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ -#include "syscalls.h" +#include <sys/syscall.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) |
