]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsblk: fix unknown type `stat` caused by missing header
authorPatrick Steinhardt <ps@pks.im>
Wed, 26 Sep 2018 06:23:08 +0000 (08:23 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 4 Oct 2018 09:56:35 +0000 (11:56 +0200)
The structure `blkdev_cxt` has a `struct stat` member embedded, whose
size may not be known on some systems because of a missing include for
"sys/stat.h". On glibc-based systems, this header is included
transitively via "sys/statvfs.h", but on musl-based systems it is not.

Fix the resulting compile error due to unknown size of the struct by
including "sys/stat.h".

Signed-off-by: Patrick Steinhardt <ps@pks.im>
misc-utils/lsblk.h

index 6e0186576cdffd3b60fb08ecd29b42507305493d..baad3aa9bb92d844f1a6943e10f88c25b16f3b09 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <stdint.h>
 #include <inttypes.h>
+#include <sys/stat.h>
 #include <sys/statvfs.h>
 
 #include <libsmartcols.h>