1 /* vi: set sw=4 ts=4: */
3 * __syscall_fcntl64() for uClibc
5 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
11 #include <sys/syscall.h>
12 #include <bits/wordsize.h>
14 #if defined __NR_fcntl64 && __WORDSIZE == 32
19 # define __NR___fcntl64_nocancel __NR_fcntl64
20 _syscall3(int, __NC(fcntl64), int, fd, int, cmd, long, arg)
22 int fcntl64(int fd, int cmd, ...)
28 arg = va_arg(list, long);
31 if (SINGLE_THREAD_P || (cmd != F_SETLKW64))
32 return __NC(fcntl64)(fd, cmd, arg);
34 int oldtype = LIBC_CANCEL_ASYNC();
35 int result = __NC(fcntl64)(fd, cmd, arg);
36 LIBC_CANCEL_RESET(oldtype);
40 lt_strong_alias(fcntl64)
41 lt_libc_hidden(fcntl64)