diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-07-05 10:36:11 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-07-05 10:36:11 +0000 |
commit | 693d10b17f0ec822d9f20b191dbf8c62c69b40fd (patch) | |
tree | 520559b8909c7fcaaa6078a0b9883657b0685e3a /libc/sysdeps/linux/common | |
parent | a7f7c3515b5055e00ef30618097e0b1f0b224f36 (diff) |
add support for 32bit version of fchown
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r-- | libc/sysdeps/linux/common/fchown.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/fchown.c b/libc/sysdeps/linux/common/fchown.c index dbadd607e..60ad21937 100644 --- a/libc/sysdeps/linux/common/fchown.c +++ b/libc/sysdeps/linux/common/fchown.c @@ -9,6 +9,15 @@ #include "syscalls.h" #include <unistd.h> +#include <linux/version.h> + +/* Linux 2.3.39 introduced 32bit UID/GIDs. Some platforms had 32 + bit type all along. */ +#if LINUX_VERSION_CODE >= 131879 + +_syscall3(int, fchown, int, fd, uid_t, owner, gid_t, group); + +#else #define __NR___syscall_fchown __NR_fchown static inline _syscall3(int, __syscall_fchown, int, fd, @@ -23,3 +32,5 @@ int fchown(int fd, uid_t owner, gid_t group) } return (__syscall_fchown(fd, owner, group)); } + +#endif |