-@@ -396,7 +401,7 @@ int unchanged_file(char *fn, struct file
- if (ignore_times)
- return 0;
-
-- return cmp_modtime(st->st_mtime, file->modtime) == 0;
-+ return cmp_time(st->st_mtime, file->modtime) == 0;
- }
-
-
-@@ -550,13 +555,13 @@ static int find_fuzzy(struct file_struct
- uint32 dist;
-
- if (!S_ISREG(fp->mode) || !fp->length
-- || fp->flags & FLAG_NO_FUZZY)
-+ || FFLAGS(fp) & FLAG_NO_FUZZY)
- continue;
-
- name = fp->basename;
-
- if (fp->length == file->length
-- && cmp_modtime(fp->modtime, file->modtime) == 0) {
-+ && cmp_time(fp->modtime, file->modtime) == 0) {
- if (verbose > 4) {
- rprintf(FINFO,
- "fuzzy size/modtime match for %s\n",
-@@ -632,7 +637,7 @@ static int try_dests_reg(struct file_str
- if (!unchanged_attrs(file, stp))
- continue;
- if ((always_checksum || ignore_times)
-- && cmp_modtime(stp->st_mtime, file->modtime))
-+ && cmp_time(stp->st_mtime, file->modtime))
- continue;
- best_match = j;
- match_level = 3;
-@@ -894,7 +899,7 @@ static void recv_generator(char *fname,
- && verbose && code && f_out != -1)
- rprintf(code, "%s/\n", fname);
- if (delete_during && f_out != -1 && !phase && dry_run < 2
-- && (file->flags & FLAG_DEL_HERE))
-+ && (FFLAGS(file) & FLAG_DEL_HERE))
- delete_in_dir(the_file_list, fname, file, &st);
- return;
- }
-@@ -1071,7 +1076,7 @@ static void recv_generator(char *fname,
- }
-
- if (update_only && statret == 0
-- && cmp_modtime(st.st_mtime, file->modtime) > 0) {
-+ && cmp_time(st.st_mtime, file->modtime) > 0) {
- if (verbose > 1)
- rprintf(FINFO, "%s is newer\n", fname);
- return;
-@@ -1174,7 +1179,7 @@ static void recv_generator(char *fname,
- if (fuzzy_basis) {
- int j = flist_find(fuzzy_dirlist, file);
- if (j >= 0) /* don't use changing file as future fuzzy basis */
-- fuzzy_dirlist->files[j]->flags |= FLAG_NO_FUZZY;
-+ FFLAGS(fuzzy_dirlist->files[j]) |= FLAG_NO_FUZZY;
- }
-
- /* open the file */
---- orig/hlink.c 2006-01-14 20:27:09
-+++ hlink.c 2006-01-24 19:17:58
-@@ -26,6 +26,7 @@ extern int link_dest;
- extern int make_backups;
- extern int log_format_has_i;
- extern char *basis_dir[];
-+extern unsigned int file_struct_len;
- extern struct file_list *the_file_list;
-
- #ifdef SUPPORT_HARD_LINKS
-@@ -86,10 +87,10 @@ static void link_idev_data(void)
- FPTR(cur)->link_u.links = pool_talloc(hlink_pool,
- struct hlink, 1, "hlink_list");
-
-- FPTR(head)->flags |= FLAG_HLINK_TOL;
-+ FFLAGS(FPTR(head)) |= FLAG_HLINK_TOL;
- FPTR(cur)->F_HLINDEX = to;
- FPTR(cur)->F_NEXT = head;
-- FPTR(cur)->flags |= FLAG_HLINK_EOL;
-+ FFLAGS(FPTR(cur)) |= FLAG_HLINK_EOL;
- hlink_list[to++] = head;
- } else
- FPTR(cur)->link_u.links = NULL;
-@@ -175,7 +176,7 @@ int hard_link_check(struct file_struct *
- {
- #ifdef SUPPORT_HARD_LINKS
- int head;
-- if (skip && !(file->flags & FLAG_HLINK_EOL))
-+ if (skip && !(FFLAGS(file) & FLAG_HLINK_EOL))
- head = hlink_list[file->F_HLINDEX] = file->F_NEXT;
- else
- head = hlink_list[file->F_HLINDEX];
-@@ -270,8 +271,8 @@ void hard_link_cluster(struct file_struc
- file->F_HLINDEX = FINISHED_LINK;
- if (link_stat(f_name(file, hlink1), &st1, 0) < 0)
- return;
-- if (!(file->flags & FLAG_HLINK_TOL)) {
-- while (!(file->flags & FLAG_HLINK_EOL)) {
-+ if (!(FFLAGS(file) & FLAG_HLINK_TOL)) {
-+ while (!(FFLAGS(file) & FLAG_HLINK_EOL)) {
- ndx = file->F_NEXT;
- file = FPTR(ndx);
- }
-@@ -286,6 +287,6 @@ void hard_link_cluster(struct file_struc
- maybe_hard_link(file, ndx, hlink2, statret, &st2,
- hlink1, &st1, itemizing, code);
- file->F_HLINDEX = FINISHED_LINK;
-- } while (!(file->flags & FLAG_HLINK_EOL));
-+ } while (!(FFLAGS(file) & FLAG_HLINK_EOL));
- #endif
- }
---- orig/log.c 2006-01-24 22:24:32
-+++ log.c 2006-01-24 22:50:01
-@@ -38,6 +38,7 @@ extern int module_id;
- extern int msg_fd_out;
+ if (preserve_uid && am_root && (uid_t)F_OWNER(file) != sxp->st.st_uid)
+@@ -880,6 +884,8 @@ static int try_dests_reg(struct file_str
+ if (link_dest) {
+ if (!hard_link_one(file, fname, cmpbuf, 1))
+ goto try_a_copy;
++ if (preserve_atimes)
++ set_file_attrs(fname, file, sxp, NULL, 0);
+ if (preserve_hard_links && F_IS_HLINKED(file))
+ finish_hard_link(file, fname, &sxp->st, itemizing, code, j);
+ if (itemizing && (verbose > 1 || stdout_format_has_i > 1)) {
+@@ -1743,7 +1749,7 @@ static void touch_up_dirs(struct file_li
+ 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 && !(++j % lull_mod))
+ maybe_send_keepalive();
+ else if (!(j % 200))
+--- old/log.c
++++ new/log.c
+@@ -34,6 +34,7 @@ extern int msg_fd_out;
+ extern int allow_8bit_chars;