diff --git a/flist.c b/flist.c
--- a/flist.c
+++ b/flist.c
-@@ -1239,7 +1239,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1286,7 +1286,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
-@@ -718,7 +718,8 @@ int unchanged_file(char *fn, struct file_struct *file, STRUCT_STAT *st)
+@@ -721,7 +721,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];
typedef struct {
char *datum, *name;
-@@ -237,7 +243,9 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
+@@ -238,7 +244,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;
}
-@@ -844,6 +852,39 @@ int del_def_xattr_acl(const char *fname)
+@@ -894,6 +902,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)