renameat2.c 308 B

1234567891011
  1. #define _GNU_SOURCE
  2. #include <stdio.h>
  3. #include "syscall.h"
  4. int renameat2(int oldfd, const char *old, int newfd, const char *new, unsigned flags)
  5. {
  6. #ifdef SYS_renameat
  7. if (!flags) return syscall(SYS_renameat, oldfd, old, newfd, new);
  8. #endif
  9. return syscall(SYS_renameat2, oldfd, old, newfd, new, flags);
  10. }