- finish_hard_link(file, fname, stp, itemizing, code, j);
- if (itemizing && (verbose > 1 || stdout_format_has_i > 1)) {
---- old/log.c
-+++ new/log.c
-@@ -37,6 +37,7 @@ extern int msg_fd_out;
- extern int allow_8bit_chars;
- extern int protocol_version;
- extern int preserve_times;
-+extern int preserve_atimes;
- extern int preserve_uid;
- extern int preserve_gid;
- extern int stdout_format_has_i;
-@@ -625,7 +626,8 @@ static void log_formatted(enum logcode c
+ finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
+ if (!maybe_ATTRS_REPORT && (INFO_GTE(NAME, 2) || stdout_format_has_i > 1)) {
+@@ -1010,6 +1015,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+ static void list_file_entry(struct file_struct *f)
+ {
+ char permbuf[PERMSTRING_SIZE];
++ time_t atime = atimes_ndx ? f_atime(f) : 0;
+ int64 len;
+ int colwidth = human_readable ? 14 : 11;
+
+@@ -1025,10 +1031,11 @@ static void list_file_entry(struct file_struct *f)
+
+ #ifdef SUPPORT_LINKS
+ if (preserve_links && S_ISLNK(f->mode)) {
+- rprintf(FINFO, "%s %*s %s %s -> %s\n",
++ rprintf(FINFO, "%s %*s %s %s %s -> %s\n",
+ permbuf, colwidth, comma_num(len),
+- timestring(f->modtime), f_name(f, NULL),
+- F_SYMLINK(f));
++ timestring(f->modtime),
++ atimes_ndx ? timestring(atime) : "",
++ f_name(f, NULL), F_SYMLINK(f));
+ } else
+ #endif
+ if (missing_args == 2 && f->mode == 0) {
+@@ -1036,9 +1043,11 @@ static void list_file_entry(struct file_struct *f)
+ colwidth + 31, "*missing",
+ f_name(f, NULL));
+ } else {
+- rprintf(FINFO, "%s %*s %s %s\n",
++ rprintf(FINFO, "%s %*s %s %s %s\n",
+ permbuf, colwidth, comma_num(len),
+- timestring(f->modtime), f_name(f, NULL));
++ timestring(f->modtime),
++ atimes_ndx ? timestring(atime) : "",
++ f_name(f, NULL));
+ }
+ }
+
+@@ -1870,7 +1879,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+ STRUCT_STAT st;
+ if (link_stat(fname, &st, 0) == 0
+ && cmp_time(st.st_mtime, file->modtime) != 0)
+- set_modtime(fname, file->modtime, file->mode);
++ set_times(fname, file->modtime, file->modtime, file->mode);
+ }
+ if (counter >= loopchk_limit) {
+ if (allowed_lull)
+diff --git a/ifuncs.h b/ifuncs.h
+--- a/ifuncs.h
++++ b/ifuncs.h
+@@ -35,6 +35,28 @@ realloc_xbuf(xbuf *xb, size_t sz)
+ xb->size = sz;
+ }
+
++static inline time_t
++f_atime(struct file_struct *fp)
++{
++#if SIZEOF_TIME_T > 4
++ time_t atime;
++ memcpy(&atime, &REQ_EXTRA(fp, atimes_ndx)->unum, SIZEOF_TIME_T);
++ return atime;
++#else
++ return REQ_EXTRA(fp, atimes_ndx)->unum;
++#endif
++}
++
++static inline void
++f_atime_set(struct file_struct *fp, time_t atime)
++{
++#if SIZEOF_TIME_T > 4
++ memcpy(&REQ_EXTRA(fp, atimes_ndx)->unum, &atime, SIZEOF_TIME_T);
++#else
++ REQ_EXTRA(fp, atimes_ndx)->unum = (uint32)atime;
++#endif
++}
++
+ static inline int
+ to_wire_mode(mode_t mode)
+ {
+diff --git a/log.c b/log.c
+--- a/log.c
++++ b/log.c
+@@ -715,7 +715,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,