From 4abab5ad6c8465a7528ccdd5f49367da05f78bbd Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Tue, 1 Oct 2024 15:47:05 +0200 Subject: Initial version --- src/unistd/renameat.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/unistd/renameat.c (limited to 'src/unistd/renameat.c') diff --git a/src/unistd/renameat.c b/src/unistd/renameat.c new file mode 100644 index 0000000..c3b40a2 --- /dev/null +++ b/src/unistd/renameat.c @@ -0,0 +1,11 @@ +#include +#include "syscall.h" + +int renameat(int oldfd, const char *old, int newfd, const char *new) +{ +#ifdef SYS_renameat + return syscall(SYS_renameat, oldfd, old, newfd, new); +#else + return syscall(SYS_renameat2, oldfd, old, newfd, new, 0); +#endif +} -- cgit v1.2.3