chiark / gitweb /
build-sys: Add configure check for linux/btrfs.h
[elogind.git] / src / gpt-auto-generator / gpt-auto-generator.c
index 60fb19ee07f4f2394a076a4f5b4aee352f3e86c9..a26655f096fe6ddf4a62b1c8bec58b7d79a18330 100644 (file)
 #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"
@@ -175,7 +178,7 @@ static int add_swap(const char *path, const char *fstype) {
                 "DefaultDependencies=no\n"
                 "Conflicts=" SPECIAL_UMOUNT_TARGET "\n"
                 "Before=" SPECIAL_UMOUNT_TARGET " " SPECIAL_SWAP_TARGET "\n\n"
-                "[Mount]\n"
+                "[Swap]\n"
                 "What=%s\n",
                 path);