diff options
Diffstat (limited to 'usr/klibc/rename.c')
-rw-r--r-- | usr/klibc/rename.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/klibc/rename.c b/usr/klibc/rename.c new file mode 100644 index 0000000..d76b739 --- /dev/null +++ b/usr/klibc/rename.c @@ -0,0 +1,11 @@ +#include <fcntl.h> +#include <stdio.h> + +#ifndef __NR_rename + +int rename(const char *oldpath, const char *newpath) +{ + return renameat2(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0); +} + +#endif /* __NR_rename */ |