projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
explicitly reject empty names in dynamic linker load_library function
[musl]
/
src
/
stdio
/
rename.c
diff --git
a/src/stdio/rename.c
b/src/stdio/rename.c
index
97f1453
..
04c90c0
100644
(file)
--- 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
}