From: Mike Frysinger Date: Sun, 3 Oct 2010 20:00:09 +0000 (-0400) Subject: fallocate: fix build failure with old linux headers X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fac8b4bd78cd0f33cf71f4a8525f2f56b5e6b3f2;p=util-linux fallocate: fix build failure with old linux headers If linux/falloc.h does not exist, the build system still enables the fallocate util, but ultimately fails when it tries to include the header and use a define from it. Signed-off-by: Mike Frysinger --- diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c index d1f43c24..fd4d2a9a 100644 --- a/sys-utils/fallocate.c +++ b/sys-utils/fallocate.c @@ -37,7 +37,11 @@ # include #endif -#include /* for FALLOC_FL_* flags */ +#ifdef HAVE_LINUX_FALLOC_H +# include /* for FALLOC_FL_* flags */ +#else +# define FALLOC_FL_KEEP_SIZE 1 +#endif #include "nls.h" #include "strtosize.h"