./configure (optional if already run)
make
+based-on: 40afd365cc8ca968fd16e161d24df5b8a8a520cc
diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -1250,7 +1250,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1298,7 +1298,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
memcpy(bp + basename_len, linkname, linkname_len);
#endif
diff --git a/generator.c b/generator.c
--- a/generator.c
+++ b/generator.c
-@@ -721,7 +721,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -758,7 +758,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
of the file time to determine whether to sync */
if (always_checksum > 0 && S_ISREG(st->st_mode)) {
char sum[MAX_DIGEST_LEN];
new file mode 100644
--- /dev/null
+++ b/support/xsums
-@@ -0,0 +1,118 @@
-+#!/usr/bin/perl -w
+@@ -0,0 +1,119 @@
++#!/usr/bin/perl
+use strict;
++use warnings;
+
+use Getopt::Long;
+use Cwd qw(abs_path cwd);
diff --git a/xattrs.c b/xattrs.c
--- a/xattrs.c
+++ b/xattrs.c
-@@ -33,6 +33,8 @@ extern int read_only;
- extern int list_only;
- extern int preserve_xattrs;
+@@ -36,6 +36,8 @@ extern int preserve_links;
+ extern int preserve_devices;
+ extern int preserve_specials;
extern int checksum_seed;
+extern int checksum_len;
+extern int protocol_version;
#define RSYNC_XAL_INITIAL 5
#define RSYNC_XAL_LIST_INITIAL 100
-@@ -68,6 +70,10 @@ extern int checksum_seed;
+@@ -71,6 +73,10 @@ extern int checksum_seed;
#define XACC_ACL_ATTR RSYNC_PREFIX "%" XACC_ACL_SUFFIX
#define XDEF_ACL_SUFFIX "dacl"
#define XDEF_ACL_ATTR RSYNC_PREFIX "%" XDEF_ACL_SUFFIX
typedef struct {
char *datum, *name;
-@@ -238,7 +244,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -246,7 +252,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
|| (am_root < 0
&& (strcmp(name+RPRE_LEN+1, XSTAT_SUFFIX) == 0
|| strcmp(name+RPRE_LEN+1, XACC_ACL_SUFFIX) == 0
continue;
}
-@@ -891,6 +899,39 @@ int del_def_xattr_acl(const char *fname)
+@@ -956,6 +964,39 @@ int del_def_xattr_acl(const char *fname)
}
#endif
+ char buf[256];
+ uint32 file_length, mtime;
+ int len;
-+
++
+ len = sys_lgetxattr(fname, mdattr, buf, sizeof buf);
+ if (len < 0) {
+ if (errno == ENOTSUP || errno == ENOATTR)