__syscall_fcntl64.c 670 B

123456789101112131415161718192021222324252627282930
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * __syscall_fcntl64() for uClibc
  4. *
  5. * Copyright (C) 2000-2004 by Erik Andersen <andersen@codpoet.org>
  6. *
  7. * GNU Library General Public License (LGPL) version 2 or later.
  8. */
  9. #include "syscalls.h"
  10. #include <stdarg.h>
  11. #include <fcntl.h>
  12. #if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
  13. #define __NR___syscall_fcntl64 __NR_fcntl64
  14. static inline _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg);
  15. int __libc_fcntl64(int fd, int cmd, ...)
  16. {
  17. long arg;
  18. va_list list;
  19. va_start(list, cmd);
  20. arg = va_arg(list, long);
  21. va_end(list);
  22. return (__syscall_fcntl64(fd, cmd, arg));
  23. }
  24. weak_alias(__libc_fcntl64, fcntl64);
  25. #endif