musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdio/rename.c
diff options
context:
space:
mode:
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
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月15日 22:03:15 +0000

AltStyle によって変換されたページ (->オリジナル) /