-- if (!S_ISDIR(st.st_mode)
-+ if (!S_ISDIR(sx.st.st_mode)
- && (len = readlink(fname, lnk, MAXPATHLEN-1)) > 0) {
- lnk[len] = 0;
- /* A link already pointing to the
-@@ -963,10 +1015,10 @@ static void recv_generator(char *fname,
- * required. */
- if (strcmp(lnk, file->u.link) == 0) {
- if (itemizing) {
-- itemize(file, ndx, 0, &st, 0,
-+ itemize(file, ndx, 0, &sx, 0,
- 0, NULL);
- }
-- set_file_attrs(fname, file, &st,
-+ set_file_attrs(fname, file, &sx,
- maybe_ATTRS_REPORT);
- if (preserve_hard_links
- && file->link_u.links) {
-@@ -979,9 +1031,9 @@ static void recv_generator(char *fname,
- }
- /* Not the right symlink (or not a symlink), so
- * delete it. */
-- if (delete_item(fname, st.st_mode, del_opts) < 0)
-+ if (delete_item(fname, sx.st.st_mode, del_opts) < 0)
- return;