X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/78286a03d196efeed754aa4c1faa571f5dbea342..ac30d22ae5bd4e1a1282e401425fe28cec6a08bb:/rsync.h diff --git a/rsync.h b/rsync.h index 79402cd7..84d1287c 100644 --- a/rsync.h +++ b/rsync.h @@ -665,6 +665,23 @@ struct ht_int64_node { #define ACLS_NEED_MASK 1 #endif +#if defined HAVE_FALLOCATE || HAVE_SYS_FALLOCATE +#ifdef HAVE_LINUX_FALLOC_H +#include +#endif +#ifdef FALLOC_FL_KEEP_SIZE +#define SUPPORT_PREALLOCATION 1 +#elif defined HAVE_FTRUNCATE +#define SUPPORT_PREALLOCATION 1 +#define PREALLOCATE_NEEDS_TRUNCATE 1 +#endif +#else /* !fallocate */ +#if defined HAVE_EFFICIENT_POSIX_FALLOCATE && defined HAVE_FTRUNCATE +#define SUPPORT_PREALLOCATION 1 +#define PREALLOCATE_NEEDS_TRUNCATE 1 +#endif +#endif + union file_extras { int32 num; uint32 unum;