__syscall_fcntl64.c 651 B

123456789101112131415161718192021222324252627282930
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * __syscall_fcntl64() for uClibc
  4. *
  5. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. #include <_lfs_64.h>
  10. #include <sys/syscall.h>
  11. #ifdef __NR_fcntl64
  12. # include <stdarg.h>
  13. # include <fcntl.h>
  14. # define __NR___syscall_fcntl64 __NR_fcntl64
  15. static __inline__ _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg)
  16. int fcntl64(int fd, int cmd, ...)
  17. {
  18. long arg;
  19. va_list list;
  20. va_start(list, cmd);
  21. arg = va_arg(list, long);
  22. va_end(list);
  23. return (__syscall_fcntl64(fd, cmd, arg));
  24. }
  25. libc_hidden_def(fcntl64)
  26. #endif