]> git.eshelyaron.com Git - emacs.git/commitdiff
Port recent rename changes to Ubuntu 14.04
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 5 Aug 2017 05:34:45 +0000 (22:34 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 5 Aug 2017 05:35:11 +0000 (22:35 -0700)
* src/sysdep.c (renameat_noreplace) [!RENAME_NOREPLACE]:
Don’t use syscall.  Problem reported by Tino Calancha (Bug#27946#10).

src/sysdep.c

index 22446b25d16d55fd282ba3b371b043b32d072703..9eb733221e47b8a157bb40caa0bc8a1071653873 100644 (file)
@@ -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;