summaryrefslogtreecommitdiff
path: root/src/gpt-auto-generator/gpt-auto-generator.c
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/gpt-auto-generator/gpt-auto-generator.c
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/gpt-auto-generator/gpt-auto-generator.c')
-rw-r--r--src/gpt-auto-generator/gpt-auto-generator.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index 81d692c51..a26655f09 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -22,11 +22,14 @@
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
-#include <linux/btrfs.h>
#include <sys/ioctl.h>
#include <sys/statfs.h>
#include <blkid.h>
+#ifdef HAVE_LINUX_BTRFS_H
+#include <linux/btrfs.h>
+#endif
+
#include "path-util.h"
#include "util.h"
#include "mkdir.h"