diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-30 02:54:42 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-30 02:54:42 +0000 |
commit | 92ac94812b84cef7d9bddfffd0446721a7a6ee06 (patch) | |
tree | a5a2c895d613afb96fb71c9c19be9ec266db30d7 /libc/sysdeps/linux/common/__syscall_fcntl.c | |
parent | ac02770c4a13eff9fef10c33ebb18d765f25a968 (diff) | |
download | uClibc-alpine-92ac94812b84cef7d9bddfffd0446721a7a6ee06.tar.bz2 uClibc-alpine-92ac94812b84cef7d9bddfffd0446721a7a6ee06.tar.xz |
Finalize the merge from the trunk. There are more files to be
merged, but they will be done manually.
Diffstat (limited to 'libc/sysdeps/linux/common/__syscall_fcntl.c')
-rw-r--r-- | libc/sysdeps/linux/common/__syscall_fcntl.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/common/__syscall_fcntl.c b/libc/sysdeps/linux/common/__syscall_fcntl.c index 62568522b..0a5812976 100644 --- a/libc/sysdeps/linux/common/__syscall_fcntl.c +++ b/libc/sysdeps/linux/common/__syscall_fcntl.c @@ -11,10 +11,12 @@ #include <stdarg.h> #include <fcntl.h> -#define __NR___syscall_fcntl __NR_fcntl #ifdef __UCLIBC_HAS_LFS__ -static inline +extern int __libc_fcntl64(int fd, int cmd, long arg); #endif + +#define __NR___syscall_fcntl __NR_fcntl +static inline _syscall3(int, __syscall_fcntl, int, fd, int, cmd, long, arg); int __libc_fcntl(int fd, int cmd, ...) @@ -22,13 +24,18 @@ int __libc_fcntl(int fd, int cmd, ...) long arg; va_list list; + va_start(list, cmd); + arg = va_arg(list, long); + va_end(list); + if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) { +#ifdef __UCLIBC_HAS_LFS__ + return __libc_fcntl64(fd, cmd, arg); +#else __set_errno(ENOSYS); return -1; +#endif } - va_start(list, cmd); - arg = va_arg(list, long); - va_end(list); return (__syscall_fcntl(fd, cmd, arg)); } |