]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fstrim: cleanup includes
authorKarel Zak <kzak@redhat.com>
Thu, 22 Mar 2018 12:17:10 +0000 (13:17 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Jul 2018 13:58:25 +0000 (15:58 +0200)
* HAVE_SYS_FS_H is incorrect (should be HAVE_LINUX_FS_H)

* linux/fs.h cannot be included together with sys/mount.h as the both
  files define MS_* constants. The libmount.h includes sys/mount.h now.

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/fstrim.c

index ca8cf256ded459b8265de861039ddd7722b1cb10..53ac594c05d99ab6228bc21bb93cf85cc9a5762c 100644 (file)
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 
-#ifdef HAVE_SYS_FS_H
-# include <linux/fs.h>
-#endif
-
 #include "nls.h"
 #include "strutils.h"
 #include "c.h"
 
 #include <libmount.h>
 
+
+/* We cannot include linux/fs.h due to MS_* constants collision with
+ * sys/mount.h (and libmount.h)
+ */
 #ifndef FITRIM
 struct fstrim_range {
        uint64_t start;