extern int append_mode;
extern int fuzzy_basis;
extern int read_batch;
-@@ -184,6 +185,15 @@ void setup_protocol(int f_out,int f_in)
+@@ -187,6 +188,15 @@ void setup_protocol(int f_out,int f_in)
if (read_batch)
check_batch_flags();
{"inplace", 0, POPT_ARG_VAL, &inplace, 1, 0, 0 },
{"no-inplace", 0, POPT_ARG_VAL, &inplace, 0, 0, 0 },
{"append", 0, POPT_ARG_NONE, 0, OPT_APPEND, 0, 0 },
-@@ -2053,6 +2062,9 @@ void server_options(char **args, int *argc_p)
+@@ -2061,6 +2070,9 @@ void server_options(char **args, int *argc_p)
else if (remove_source_files)
args[ac++] = "--remove-sent-files";
+ if (preallocate_files && am_sender)
+ args[ac++] = "--preallocate";
+
- *argc_p = ac;
- return;
-
+ if (ac > MAX_SERVER_ARGS) { /* Not possible... */
+ rprintf(FERROR, "argc overflow in server_options().\n");
+ exit_cleanup(RERR_MALLOC);
diff --git a/receiver.c b/receiver.c
--- a/receiver.c
+++ b/receiver.c
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -612,6 +612,13 @@ struct ht_int64_node {
+@@ -614,6 +614,13 @@ struct ht_int64_node {
#define ACLS_NEED_MASK 1
#endif