-@@ -112,6 +113,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -125,6 +126,8 @@ void setup_protocol(int f_out,int f_in)
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 \
- strerror putenv iconv_open locale_charset nl_langinfo getxattr \
+ chflags strerror putenv iconv_open locale_charset nl_langinfo getxattr \
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 \
- strerror putenv iconv_open locale_charset nl_langinfo getxattr \
+ chflags strerror putenv iconv_open locale_charset nl_langinfo getxattr \
- static dev_t rdev;
- static uint32 rdev_major;
-@@ -391,6 +395,12 @@ static void send_file_entry(int f, struc
+ #endif
+@@ -393,6 +397,12 @@ static void send_file_entry(int f, struc
-@@ -511,6 +521,10 @@ static void send_file_entry(int f, struc
+@@ -513,6 +523,10 @@ static void send_file_entry(int f, struc
}
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
}
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
- static dev_t rdev;
- static uint32 rdev_major;
-@@ -728,9 +745,12 @@ static struct file_struct *recv_file_ent
+ #endif
+@@ -732,9 +749,12 @@ static struct file_struct *recv_file_ent
-@@ -1258,7 +1269,7 @@ static void recv_generator(char *fname,
+@@ -1263,7 +1274,7 @@ static void recv_generator(char *fname,
goto cleanup; /* Any errors get reported later. */
if (do_mkdir(fname, file->mode & 0700) == 0)
file->flags |= FLAG_DIR_CREATED;
goto cleanup; /* Any errors get reported later. */
if (do_mkdir(fname, file->mode & 0700) == 0)
file->flags |= FLAG_DIR_CREATED;
-@@ -1270,7 +1281,7 @@ static void recv_generator(char *fname,
+@@ -1275,7 +1286,7 @@ static void recv_generator(char *fname,
* we need to delete it. If it doesn't exist, then
* (perhaps recursively) create it. */
if (statret == 0 && !S_ISDIR(sx.st.st_mode)) {
* we need to delete it. If it doesn't exist, then
* (perhaps recursively) create it. */
if (statret == 0 && !S_ISDIR(sx.st.st_mode)) {
-@@ -1399,7 +1410,7 @@ static void recv_generator(char *fname,
+@@ -1404,7 +1415,7 @@ static void recv_generator(char *fname,
goto cleanup;
} else if (basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
goto cleanup;
} else if (basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-@@ -1478,7 +1489,7 @@ static void recv_generator(char *fname,
+@@ -1483,7 +1494,7 @@ static void recv_generator(char *fname,
goto cleanup;
} else if (basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
goto cleanup;
} else if (basis_dir[0] != NULL) {
int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx,
-@@ -1569,7 +1580,7 @@ static void recv_generator(char *fname,
+@@ -1574,7 +1585,7 @@ static void recv_generator(char *fname,
if (write_batch && read_batch) {
snprintf(err_buf, sizeof err_buf,
"--write-batch and --read-batch can not be used together\n");
if (write_batch && read_batch) {
snprintf(err_buf, sizeof err_buf,
"--write-batch and --read-batch can not be used together\n");
-@@ -1790,6 +1807,9 @@ void server_options(char **args, int *ar
+@@ -1792,6 +1809,9 @@ void server_options(char **args, int *ar
/* 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. */
/* 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. */
/* When the associated option is on, all entries will have these present: */
#define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
#define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
/* When the associated option is on, all entries will have these present: */
#define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
#define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
-@@ -162,6 +162,15 @@ int do_chmod(const char *path, mode_t mo
+@@ -173,6 +173,15 @@ int do_chmod(const char *path, mode_t mo