[prev in list] [next in list] [prev in thread] [next in thread] 

List:       util-linux-ng
Subject:    [PATCH 1/2] lsblk: fix unknown type `stat` caused by missing header
From:       Patrick Steinhardt <ps () pks ! im>
Date:       2018-09-26 6:23:08
Message-ID: 887b46a6a20224db2f5b54a518d2b9522399d7d8.1537942755.git.ps () pks ! im
[Download RAW message or body]

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 | 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic