--- old/flist.c
+++ new/flist.c
-@@ -48,6 +48,7 @@ extern int preserve_devices;
+@@ -49,6 +49,7 @@ extern int preserve_devices;
extern int preserve_specials;
extern int preserve_uid;
extern int preserve_gid;
extern int relative_paths;
extern int implied_dirs;
extern int file_extra_cnt;
-@@ -143,6 +144,7 @@ void show_flist_stats(void)
+@@ -144,6 +145,7 @@ void show_flist_stats(void)
static void list_file_entry(struct file_struct *f)
{
char permbuf[PERMSTRING_SIZE];
double len;
if (!F_IS_ACTIVE(f)) {
-@@ -157,14 +159,16 @@ static void list_file_entry(struct file_
+@@ -158,14 +160,16 @@ static void list_file_entry(struct file_
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
f_name(f, NULL));
}
}
-@@ -348,6 +352,7 @@ int push_flist_dir(const char *dir, int
+@@ -349,6 +353,7 @@ int push_flist_dir(const char *dir, int
static void send_file_entry(int f, struct file_struct *file, int ndx)
{
static time_t modtime;
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -415,6 +420,13 @@ static void send_file_entry(int f, struc
+@@ -416,6 +421,13 @@ static void send_file_entry(int f, struc
flags |= XMIT_SAME_TIME;
else
modtime = file->modtime;
#ifdef SUPPORT_HARD_LINKS
if (tmp_dev != 0) {
-@@ -482,6 +494,8 @@ static void send_file_entry(int f, struc
+@@ -483,6 +495,8 @@ static void send_file_entry(int f, struc
write_int(f, modtime);
if (!(flags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
+ if (preserve_atimes && !S_ISDIR(mode) && !(flags & XMIT_SAME_ATIME))
+ write_int(f, atime);
if (preserve_uid && !(flags & XMIT_SAME_UID)) {
- write_abbrevint30(f, uid);
- if (flags & XMIT_USER_NAME_FOLLOWS) {
-@@ -558,7 +572,7 @@ static void send_file_entry(int f, struc
+ if (protocol_version < 30)
+ write_int(f, uid);
+@@ -569,7 +583,7 @@ static void send_file_entry(int f, struc
static struct file_struct *recv_file_entry(struct file_list *flist,
int flags, int f)
{
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -655,6 +669,8 @@ static struct file_struct *recv_file_ent
+@@ -667,6 +681,8 @@ static struct file_struct *recv_file_ent
modtime = (time_t)read_int(f);
if (!(flags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
if (chmod_modes && !S_ISLNK(mode))
mode = tweak_mode(mode, chmod_modes);
-@@ -769,6 +785,8 @@ static struct file_struct *recv_file_ent
+@@ -791,6 +807,8 @@ static struct file_struct *recv_file_ent
F_OWNER(file) = uid;
if (preserve_gid)
F_GROUP(file) = gid;
if (basename != thisname) {
file->dirname = lastdir;
-@@ -1074,6 +1092,8 @@ struct file_struct *make_file(const char
+@@ -1096,6 +1114,8 @@ struct file_struct *make_file(const char
F_OWNER(file) = st.st_uid;
if (preserve_gid)
F_GROUP(file) = st.st_gid;
--- old/rsync.h
+++ new/rsync.h
@@ -56,6 +56,7 @@
- #define XMIT_RDEV_MINOR_IS_SMALL (1<<11)
- #define XMIT_USER_NAME_FOLLOWS (1<<12) /* protocols >= 30 */
- #define XMIT_GROUP_NAME_FOLLOWS (1<<13) /* protocols >= 30 */
-+#define XMIT_SAME_ATIME (1<<14) /* protocols >= 30 */
+ #define XMIT_RDEV_MINOR_8_pre30 (1<<11) /* protocols 28 - 29 */
+ #define XMIT_GROUP_NAME_FOLLOWS (1<<11) /* protocols 30 - NOW */
+ #define XMIT_HLINK_FIRST (1<<12) /* protocols 30 - NOW */
++#define XMIT_SAME_ATIME (1<<13) /* protocols ?? - NOW */
/* These flags are used in the live flist data. */