Rsync acl patch 1.113 compilation problems on cygwin

Wayne Davison wayned at samba.org
Mon Mar 20 17:48:07 GMT 2006


On Mon, Mar 20, 2006 at 02:40:33PM +0100, Tevfik Karag?lle wrote:
> rsync.c:105: warning: unused parameter 'dflt_perms'

This would seem to indicate that the 3rd hunk in the patch for rsync.c
didn't get applied:

@@ -116,7 +118,7 @@ mode_t dest_mode(mode_t flist_mode, mode
 				cur_mode |= (cur_mode & 0444) >> 2;
 		}
 	} else
-		cur_mode = flist_mode & ACCESSPERMS & ~orig_umask;
+		cur_mode = flist_mode & ACCESSPERMS & dflt_perms;
 	if (daemon_chmod_modes && !S_ISLNK(flist_mode))
 		cur_mode = tweak_mode(cur_mode, daemon_chmod_modes);
 	return (flist_mode & ~CHMOD_BITS) | (cur_mode & CHMOD_BITS);

I tried applying revision 1.113 of the acls.diff to 2.6.7, and none of
the hunks failed, so I don't know what might have caused this for you.

> generator.c: In function `recv_generator':
> generator.c:876: error: too few arguments to function `dest_mode'

The dest_mode() call is at line 883 in both 2.6.7 and the CVS version of
generator.c, so something is quite different about your generator.c.
This hunk of the acls.diff patch added the extra arg to the dest_mode()
call:

@@ -871,7 +880,8 @@ static void recv_generator(char *fname, 
 	if (!preserve_perms) {
 		int exists = statret == 0
 			  && S_ISDIR(st.st_mode) == S_ISDIR(file->mode);
-		file->mode = dest_mode(file->mode, st.st_mode, exists);
+		file->mode = dest_mode(file->mode, st.st_mode, dflt_perms,
+				       exists);
 	}
 
 	if (S_ISDIR(file->mode)) {

> generator.c:757: warning: 'dflt_perms' defined but not used

This makes me think that several hunks failed to apply, since dflt_perms
is referenced in 3 of them (not countint the hunk that defined it).  Did
you apply other patches to the source prior to the acls.diff patch?

..wayne..


More information about the rsync mailing list