diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-21 11:32:39 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019-03-21 21:18:46 -0400 |
commit | 54316a52b2119edf73e274c8b4f25d7757f7b4d3 (patch) | |
tree | 22ae80ae7b8f19764561acbd111f5d8890555254 /src/unistd/renameat.c | |
parent | 46fb680c850b0846af6a7f789404077368d60c79 (diff) | |
download | musl-54316a52b2119edf73e274c8b4f25d7757f7b4d3.tar.gz musl-54316a52b2119edf73e274c8b4f25d7757f7b4d3.tar.bz2 musl-54316a52b2119edf73e274c8b4f25d7757f7b4d3.tar.xz musl-54316a52b2119edf73e274c8b4f25d7757f7b4d3.zip |
support archs with no renameat syscall, only renameat2
Diffstat (limited to 'src/unistd/renameat.c')
-rw-r--r-- | src/unistd/renameat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/unistd/renameat.c b/src/unistd/renameat.c index 12574822..c3b40a25 100644 --- a/src/unistd/renameat.c +++ b/src/unistd/renameat.c @@ -3,5 +3,9 @@ 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 } |