Skip to content

Commit

Permalink
lsblk: fix unknown type stat caused by missing header
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
pks-t authored and karelzak committed Oct 4, 2018
1 parent 7a715f7 commit 6529212
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions misc-utils/lsblk.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <stdint.h>
#include <inttypes.h>
#include <sys/stat.h>
#include <sys/statvfs.h>

#include <libsmartcols.h>
Expand Down

0 comments on commit 6529212

Please sign in to comment.