[PATCH 1/2] lsblk: fix unknown type `stat` caused by missing header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 misc-utils/lsblk.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/misc-utils/lsblk.h b/misc-utils/lsblk.h
index 6e0186576..baad3aa9b 100644
--- a/misc-utils/lsblk.h
+++ b/misc-utils/lsblk.h
@@ -8,6 +8,7 @@
 
 #include <stdint.h>
 #include <inttypes.h>
+#include <sys/stat.h>
 #include <sys/statvfs.h>
 
 #include <libsmartcols.h>
-- 
2.19.0




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux