From 0a24f47f0eeba688f92043ef8733e0f7d9836c18 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 4 Aug 2017 22:34:45 -0700 Subject: [PATCH] Port recent rename changes to Ubuntu 14.04 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/sysdep.c (renameat_noreplace) [!RENAME_NOREPLACE]: Don’t use syscall. Problem reported by Tino Calancha (Bug#27946#10). --- src/sysdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sysdep.c b/src/sysdep.c index 22446b25d16..9eb733221e4 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2691,7 +2691,7 @@ set_file_times (int fd, const char *filename, int renameat_noreplace (int srcfd, char const *src, int dstfd, char const *dst) { -#ifdef SYS_renameat2 +#if defined SYS_renameat2 && defined RENAME_NOREPLACE return syscall (SYS_renameat2, srcfd, src, dstfd, dst, RENAME_NOREPLACE); #else errno = ENOSYS; -- 2.39.2