extern int preserve_executability;
extern int preserve_times;
extern int omit_dir_times;
-@@ -53,6 +54,8 @@ extern int make_backups;
+@@ -53,6 +54,16 @@ extern int make_backups;
extern struct file_list *cur_flist, *first_flist, *dir_flist;
extern struct chmod_mode_struct *daemon_chmod_modes;
++#ifdef SUPPORT_FLAGS
++#ifndef UF_NOUNLINK
++#define UF_NOUNLINK 0
++#endif
++#ifndef SF_NOUNLINK
++#define SF_NOUNLINK 0
++#endif
+#define NOCHANGE_FLAGS (UF_IMMUTABLE|UF_APPEND|UF_NOUNLINK|SF_IMMUTABLE|SF_APPEND|SF_NOUNLINK)
++#endif
+
#if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H
iconv_t ic_chck = (iconv_t)-1;
-@@ -228,6 +231,41 @@ mode_t dest_mode(mode_t flist_mode, mode
+@@ -228,6 +239,41 @@ mode_t dest_mode(mode_t flist_mode, mode
return new_mode;
}
int set_file_attrs(char *fname, struct file_struct *file, statx *sxp,
int flags)
{
-@@ -346,6 +384,15 @@ int set_file_attrs(char *fname, struct f
+@@ -346,6 +392,15 @@ int set_file_attrs(char *fname, struct f
}
#endif
if (verbose > 1 && flags & ATTRS_REPORT) {
if (updated)
rprintf(FCLIENT, "%s\n", fname);
-@@ -398,6 +445,9 @@ void finish_transfer(char *fname, char *
+@@ -398,6 +453,9 @@ void finish_transfer(char *fname, char *
set_file_attrs(fnametmp, file, NULL,
ok_to_set_time ? 0 : ATTRS_SKIP_MTIME);
/* move tmp file over real file */
if (verbose > 2)
rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
-@@ -412,6 +462,9 @@ void finish_transfer(char *fname, char *
+@@ -412,6 +470,9 @@ void finish_transfer(char *fname, char *
}
if (ret == 0) {
/* The file was moved into place (not copied), so it's done. */