diff options
Diffstat (limited to 'src/stdio/rename.c')
-rw-r--r-- | src/stdio/rename.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stdio/rename.c b/src/stdio/rename.c index 97f14535..04c90c01 100644 --- a/src/stdio/rename.c +++ b/src/stdio/rename.c @@ -1,7 +1,12 @@ #include <stdio.h> +#include <fcntl.h> #include "syscall.h" int rename(const char *old, const char *new) { +#ifdef SYS_rename return syscall(SYS_rename, old, new); +#else + return syscall(SYS_renameat, AT_FDCWD, old, AT_FDCWD, new); +#endif } |