summaryrefslogtreecommitdiff
path: root/src/readahead
diff options
context:
space:
mode:
authorMichael Marineau <michael.marineau@coreos.com>2013-08-15 11:50:57 -0400
committerKay Sievers <kay@vrfy.org>2013-08-16 23:29:41 +0200
commit4b357e15876b730343db08719c877fdb45b6ad42 (patch)
treed57bcade64dd606ff28974274d4878bb6276069b /src/readahead
parentd0a2d726f0b6a02077c178d446f89839be474d41 (diff)
build-sys: Add configure check for linux/btrfs.h
btrfs.h was added to uapi in Linux 3.9. To fix building with older header versions this adds a configure check for the header and re-adds btrfs definitions to missing.h which was removed in bed2e820 along with two other ioctls used by gpt-auto-generator. [ Apparently, btrfs.h was only added recently: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=55e301fd57a6239ec14b91a1cf2e70b3dd135194 let's re-add it for now -- kay ]
Diffstat (limited to 'src/readahead')
-rw-r--r--src/readahead/readahead-collect.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c
index 658c230d65..5d37bb75f3 100644
--- a/src/readahead/readahead-collect.c
+++ b/src/readahead/readahead-collect.c
@@ -38,13 +38,16 @@
#include <sys/mman.h>
#include <linux/fs.h>
#include <linux/fiemap.h>
-#include <linux/btrfs.h>
#include <sys/ioctl.h>
#include <sys/vfs.h>
#include <getopt.h>
#include <sys/inotify.h>
#include <math.h>
+#ifdef HAVE_LINUX_BTRFS_H
+#include <linux/btrfs.h>
+#endif
+
#ifdef HAVE_FANOTIFY_INIT
#include <sys/fanotify.h>
#endif