]> git.proxmox.com Git - wasi-libc.git/blobdiff - libc-top-half/musl/src/stdio/rename.c
Update to musl 1.1.22.
[wasi-libc.git] / libc-top-half / musl / src / stdio / rename.c
index 04c90c01343a4b84beb5cf56b348e5d5041905ed..f540adb6cd9c2ddaff0559c39ad907007dd5510f 100644 (file)
@@ -4,9 +4,11 @@
 
 int rename(const char *old, const char *new)
 {
-#ifdef SYS_rename
+#if defined(SYS_rename)
        return syscall(SYS_rename, old, new);
-#else
+#elif defined(SYS_renameat)
        return syscall(SYS_renameat, AT_FDCWD, old, AT_FDCWD, new);
+#else
+       return syscall(SYS_renameat2, AT_FDCWD, old, AT_FDCWD, new, 0);
 #endif
 }