summaryrefslogtreecommitdiffstats
path: root/sys-utils/fstrim.c
diff options
context:
space:
mode:
authorKarel Zak2018-03-20 11:42:34 +0100
committerKarel Zak2018-03-20 11:42:34 +0100
commita0357292b5faca0383ea13626d0564d4da275b06 (patch)
tree7780c1311ea5ee50dd4b5d0107de98007dec4383 /sys-utils/fstrim.c
parentlibmount: make libmount.h more robust (diff)
downloadkernel-qcow2-util-linux-a0357292b5faca0383ea13626d0564d4da275b06.tar.gz
kernel-qcow2-util-linux-a0357292b5faca0383ea13626d0564d4da275b06.tar.xz
kernel-qcow2-util-linux-a0357292b5faca0383ea13626d0564d4da275b06.zip
fstrim: fix fs.h and mount.h collision
Unfortunately, old version of the file linux/fs.h defines MS_* macros, so the file cannot be included together with sys/mount.h. We include sys/mount.h from libmount.h now. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/fstrim.c')
-rw-r--r--sys-utils/fstrim.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c
index 98708d533..ca8cf256d 100644
--- a/sys-utils/fstrim.c
+++ b/sys-utils/fstrim.c
@@ -35,7 +35,10 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
-#include <linux/fs.h>
+
+#ifdef HAVE_SYS_FS_H
+# include <linux/fs.h>
+#endif
#include "nls.h"
#include "strutils.h"