- 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 && (verbose > 1 || stdout_format_has_i > 1)) {
+@@ -1153,6 +1159,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;
+ double len;
+
+ if (!F_IS_ACTIVE(f)) {
+@@ -1167,14 +1174,16 @@ static void list_file_entry(struct file_struct *f)
+
+ #ifdef SUPPORT_LINKS
+ if (preserve_links && S_ISLNK(f->mode)) {
+- rprintf(FINFO, "%s %11.0f %s %s -> %s\n",
++ rprintf(FINFO, "%s %11.0f %s %s %s -> %s\n",
+ permbuf, len, timestring(f->modtime),
++ atimes_ndx ? timestring(atime) : "",
+ f_name(f, NULL), F_SYMLINK(f));
+ } else
+ #endif
+ {
+- rprintf(FINFO, "%s %11.0f %s %s\n",
++ rprintf(FINFO, "%s %11.0f %s %s %s\n",
+ permbuf, len, timestring(f->modtime),
++ atimes_ndx ? timestring(atime) : "",
+ f_name(f, NULL));
+ }
+ }
+@@ -1929,7 +1938,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+ if (!(file->mode & S_IWUSR))
+ do_chmod(fname, file->mode);
+ if (need_retouch_dir_times)
+- set_modtime(fname, file->modtime, file->mode);
++ set_times(fname, file->modtime, file->modtime, file->mode);
+ if (allowed_lull && !(counter % lull_mod))
+ maybe_send_keepalive();
+ else if (!(counter & 0xFF))
+diff --git a/ifuncs.h b/ifuncs.h
+--- a/ifuncs.h
++++ b/ifuncs.h
+@@ -57,6 +57,28 @@ from_wire_mode(int mode)
+ return mode;
+ }
+
++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
+ isDigit(const char *ptr)
+ {
+diff --git a/log.c b/log.c
+--- a/log.c
++++ b/log.c
+@@ -644,7 +644,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,