author | Rich Felker <dalias@aerifal.cx> | 2014年05月29日 21:01:32 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014年05月29日 21:01:32 -0400 |
commit | dd5f50da6f6c3df5647e922e47f8568a8896a752 (patch) | |
tree | c5ab9a1006d2ab4c449f8fa922ce3237acad30e4 /src/stdio/rename.c | |
parent | 2e55da911896a91e95b24ab5dc8a9d9b0718f4de (diff) | |
download | musl-dd5f50da6f6c3df5647e922e47f8568a8896a752.tar.gz |
-rw-r--r-- | src/stdio/rename.c | 5 |
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 } |