--- old/compat.c
+++ new/compat.c
-@@ -48,6 +48,8 @@ void setup_protocol(int f_out,int f_in)
- preserve_uid = ++flist_extra_cnt;
+@@ -50,6 +50,8 @@ void setup_protocol(int f_out,int f_in)
+ preserve_uid = ++file_extra_cnt;
if (preserve_gid)
- preserve_gid = ++flist_extra_cnt;
+ preserve_gid = ++file_extra_cnt;
+ if (preserve_fileflags)
-+ preserve_fileflags = ++flist_extra_cnt;
++ preserve_fileflags = ++file_extra_cnt;
if (remote_protocol == 0) {
if (!read_batch)
--- old/configure.in
+++ new/configure.in
-@@ -549,7 +549,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
+@@ -554,7 +554,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
memmove lchown vsnprintf snprintf vasprintf asprintf setsid glob strpbrk \
strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
extern int preserve_uid;
extern int preserve_gid;
extern int relative_paths;
-@@ -315,6 +316,9 @@ static void send_file_entry(struct file_
- unsigned short flags;
+@@ -314,6 +315,9 @@ static void send_file_entry(struct file_
+ {
static time_t modtime;
static mode_t mode;
+#ifdef SUPPORT_FLAGS
/* These flags are used in the live flist data. */
-@@ -355,6 +356,10 @@ enum msgcode {
- #define schar char
+@@ -374,6 +375,10 @@ enum msgcode {
+ #endif
#endif
+#ifdef HAVE_CHFLAGS
/* Find a variable that is either exactly 32-bits or longer.
* If some code depends on 32-bit truncation, it will need to
* take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -522,6 +527,7 @@ struct file_struct {
- extern int flist_extra_cnt;
+@@ -551,6 +556,7 @@ struct file_struct {
+ extern int file_extra_cnt;
extern int preserve_uid;
extern int preserve_gid;
+extern int preserve_fileflags;
#define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
#define EXTRA_LEN (sizeof (union file_extras))
-@@ -554,6 +560,7 @@ extern int preserve_gid;
+@@ -583,6 +589,7 @@ extern int preserve_gid;
/* When the associated option is on, all entries will have these present: */
#define F_UID(f) REQ_EXTRA(f, preserve_uid)->unum
#define F_GID(f) REQ_EXTRA(f, preserve_gid)->unum