* src/copy.c (punch_hole): Work around an empty definition
of HAVE_FALLOCATE which leads to a build error of:
"error: #if with no expression"
That was triggered by the inclusion of <linux/fs.h> in
commit
v8.25-68-g89e1fef with kernel-headers-2.6.18.
Reported by Nelson H. F. Beebe
# include <linux/falloc.h>
#endif
+/* See HAVE_FALLOCATE workaround when including this file. */
#ifdef HAVE_LINUX_FS_H
# include <linux/fs.h>
#endif
punch_hole (int fd, off_t offset, off_t length)
{
int ret = 0;
-#if HAVE_FALLOCATE
+/* +0 is to work around older <linux/fs.h> defining HAVE_FALLOCATE to empty. */
+#if HAVE_FALLOCATE + 0
# if defined FALLOC_FL_PUNCH_HOLE && defined FALLOC_FL_KEEP_SIZE
ret = fallocate (fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
offset, length);