build: Move fallocate include into global.h

Move the inclusion of falloc.h with all it's possible defines for the
fallocate mode into global.h header file so we do not have to include
and define it manually in every tool using fallocate.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Lukas Czerner
2014-03-13 15:19:52 +11:00
committed by Dave Chinner
parent 613cb3027c
commit 2dc43e03e6
4 changed files with 33 additions and 17 deletions
+2 -9
View File
@@ -27,13 +27,6 @@
#ifdef HAVE_LINUX_FIEMAP_H
#include <linux/fiemap.h>
#endif
#ifdef FALLOCATE
#include <linux/falloc.h>
#ifndef FALLOC_FL_PUNCH_HOLE
/* Copy-paste from linux/falloc.h */
#define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */
#endif
#endif
#ifndef HAVE_ATTR_LIST
#define attr_list(path, buf, size, flags, cursor) (errno = -ENOSYS, -1)
#endif
@@ -2093,7 +2086,7 @@ dwrite_f(int opno, long r)
void
fallocate_f(int opno, long r)
{
#ifdef FALLOCATE
#ifdef HAVE_LINUX_FALLOC_H
int e;
pathname_t f;
int fd;
@@ -2515,7 +2508,7 @@ mknod_f(int opno, long r)
void
punch_f(int opno, long r)
{
#ifdef FALLOCATE
#ifdef HAVE_LINUX_FALLOC_H
int e;
pathname_t f;
int fd;