]> Savannah Git Hosting - gnulib.git/commitdiff
renameatu: handle ENOSYS from renameatx_np
authorPádraig Brady <P@draigBrady.com>
Tue, 2 Apr 2024 12:21:41 +0000 (13:21 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 8 Apr 2024 10:30:02 +0000 (12:30 +0200)
* lib/renameatu.c(): Fall back to renameat() when
renameatx_np(RENAME_EXCL) returns "Function not implemented".
This issue was seen with macFUSE.
Reported at https://github.com/coreutils/coreutils/issues/79

ChangeLog
lib/renameatu.c

index ec1873c694c2adf2a9a3c4b459f6770751f0b931..0a198b207fa27787c3b45f97f4dfcacf68d1ff95 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-04-02  Pádraig Brady  <P@draigBrady.com>
+
+       renameatu: handle ENOSYS from renameatx_np
+       * lib/renameatu.c(): Fall back to renameat() without RENAME_EXCL
+       if "Function not implemented" is returned.  This was seen with macFUSE.
+       Reported at https://github.com/coreutils/coreutils/issues/79
+
 2024-03-31  Bruno Haible  <bruno@clisp.org>
 
        canonicalize[-lgpl] tests: Fix test failure on musl libc.
index 174081c16b0d3c3cc122274ed7fc564738f81fe6..c9c84f27b8d212b7f93ea111e925c9a6becc1e35 100644 (file)
@@ -74,7 +74,7 @@ renameat2ish (int fd1, char const *src, int fd2, char const *dst,
   if (flags)
     {
       int r = renameatx_np (fd1, src, fd2, dst, RENAME_EXCL);
-      if (r == 0 || errno != ENOTSUP)
+      if (r == 0 || (errno != ENOTSUP && errno != ENOSYS))
         return r;
     }
 # endif