-- maybe_hard_link(file, ndx, fname, statret, st,
-+ maybe_hard_link(file, ndx, fname, statret, sxp,
- toname, &st2, itemizing, code);
- if (remove_source_files == 1 && do_xfers) {
- char numbuf[4];
-@@ -261,7 +270,7 @@ int hard_link_check(struct file_struct *
-
- #ifdef SUPPORT_HARD_LINKS
- int hard_link_one(struct file_struct *file, int ndx, char *fname,
-- int statret, STRUCT_STAT *st, char *toname, int terse,
-+ int statret, statx *sxp, char *toname, int terse,
- int itemizing, enum logcode code)
- {
- if (do_link(toname, fname)) {
-@@ -277,7 +286,11 @@ int hard_link_one(struct file_struct *fi
- }
-
- if (itemizing) {
-- itemize(file, ndx, statret, st,
+- if (!unchanged_file(cmpbuf, file, &alt_st))
++ if (!unchanged_file(cmpbuf, file, &alt_sx.st))
+ continue;
+ statret = 1;
+- *stp = alt_st;
+- if (unchanged_attrs(file, &alt_st))