]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fallocate: clean up fallbacks for FALLOC_FL_* flags
authorKarel Zak <kzak@redhat.com>
Wed, 23 Nov 2011 14:19:20 +0000 (15:19 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 23 Nov 2011 14:19:20 +0000 (15:19 +0100)
Reported-by: Voelker, Bernhard <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/fallocate.c

index b58485a7806113ec74fde144911fc160d5b4a908..ef19a770bb3e9c83850e6731705d03af1bca457c 100644 (file)
 
 #ifdef HAVE_LINUX_FALLOC_H
 # include <linux/falloc.h>     /* for FALLOC_FL_* flags */
-#else
+#endif
+
+#ifndef FALLOC_FL_KEEP_SIZE
 # define FALLOC_FL_KEEP_SIZE 1
+#endif
+
+#ifndef FALLOC_FL_PUNCH_HOLE
 # define FALLOC_FL_PUNCH_HOLE 2
 #endif