]> git.pld-linux.org Git - packages/rsync.git/blame - lchmod.patch
- rel 2; lchmod can return ENOTSUP on glibc 2.32 and older kernels (like 4.4)
[packages/rsync.git] / lchmod.patch
CommitLineData
9f299381
AM
1--- rsync-3.2.3/syscall.c~ 2020-07-28 01:36:55.000000000 +0200
2+++ rsync-3.2.3/syscall.c 2020-11-06 17:26:04.220502740 +0100
3@@ -232,7 +232,8 @@ int do_chmod(const char *path, mode_t mo
4 RETURN_ERROR_IF_RO_OR_LO;
5 #ifdef HAVE_LCHMOD
6 code = lchmod(path, mode & CHMOD_BITS);
7-#else
8+ if (code < 0 && errno == ENOTSUP) {
9+#endif
10 if (S_ISLNK(mode)) {
11 # if defined HAVE_SETATTRLIST
12 struct attrlist attrList;
13@@ -247,6 +248,8 @@ int do_chmod(const char *path, mode_t mo
14 # endif
15 } else
16 code = chmod(path, mode & CHMOD_BITS); /* DISCOURAGED FUNCTION */
17+#ifdef HAVE_LCHMOD
18+ }
19 #endif /* !HAVE_LCHMOD */
20 if (code != 0 && (preserve_perms || preserve_executability))
21 return code;
This page took 0.059944 seconds and 4 git commands to generate.