From 54316a52b2119edf73e274c8b4f25d7757f7b4d3 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 21 Mar 2019 11:32:39 -0400 Subject: support archs with no renameat syscall, only renameat2 --- src/unistd/renameat.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/unistd/renameat.c') 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 } -- cgit v1.2.1