__syscall_fcntl64.c 734 B

12345678910111213141516171819202122232425262728293031
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * __syscall_fcntl64() for uClibc
  4. *
  5. * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. #include "syscalls.h"
  10. #include <stdarg.h>
  11. #include <fcntl.h>
  12. #if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
  13. #undef fcntl64
  14. #define __NR___syscall_fcntl64 __NR_fcntl64
  15. static inline _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg);
  16. int attribute_hidden __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. strong_alias(__fcntl64,fcntl64)
  26. weak_alias(__fcntl64,__libc_fcntl64)
  27. #endif