Compilation problem with linux/falloc.h include in rsync.h

Mulander netprobe at
Sun May 15 10:36:54 MDT 2011

Here is the diff I applied to my copy of the sources which allowed me to
pass the compilation without any problems.

Just for the record I'm testing this on Slackware GNU/Linux:

mulander at bunkier_mysli:~/code/blog/lac/rsync$ uname -a
Linux bunkier_mysli #2 SMP Sat Feb 6 11:22:33 CET 2010 i686
AMD Duron(tm) Processor AuthenticAMD GNU/Linux

rsync --version output after applying my patch:

mulander at bunkier_mysli:~/code/blog/lac/rsync$ ./rsync --version
rsync  version 3.1.0dev  protocol version 31.PR13
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes, prealloc

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

Adam Wolk

diff --git a/rsync.h b/rsync.h
index 99c7d6c..a80d11f 100644
--- a/rsync.h
+++ b/rsync.h
@@ -666,7 +666,7 @@ struct ht_int64_node {

-#include <linux/falloc.h>
+#include <fcntl.h>
 #elif defined HAVE_FTRUNCATE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the rsync mailing list