renameat.c 499 B

1234567891011121314151617181920212223
  1. /*
  2. * renameat() for uClibc
  3. *
  4. * Copyright (C) 2009 Analog Devices Inc.
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. */
  8. #include <stdio.h>
  9. #include <fcntl.h>
  10. #include <sysdep.h>
  11. #include <errno.h>
  12. int
  13. renameat (int oldfd, const char *old, int newfd, const char *new)
  14. {
  15. #ifdef __NR_renameat
  16. return INLINE_SYSCALL (renameat, 4, oldfd, old, newfd, new);
  17. #else
  18. return INLINE_SYSCALL (renameat2, 5, oldfd, old, newfd, new, 0);
  19. #endif
  20. }
  21. libc_hidden_def (renameat)