diff mbox

btrfs-progs: convert: add missing types header

Message ID dda485a3d788c47bb6849218f695db7b51822872.1509454674.git.baruch@tkos.co.il (mailing list archive)
State New, archived
Headers show

Commit Message

Baruch Siach Oct. 31, 2017, 12:57 p.m. UTC
Build with musl libc needs the sys/types.h header for the dev_t type,
since this header is not included indirectly. This fixes the following
build failure:

In file included from convert/source-fs.c:23:0:
./convert/source-fs.h:112:1: error: unknown type name ‘dev_t’
 dev_t decode_dev(u32 dev);
 ^~~~~
convert/source-fs.c:31:1: error: unknown type name ‘dev_t’
 dev_t decode_dev(u32 dev)
 ^~~~~

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 convert/source-fs.h | 1 +
 1 file changed, 1 insertion(+)

Comments

David Sterba Nov. 9, 2017, 5:09 p.m. UTC | #1
On Tue, Oct 31, 2017 at 02:57:54PM +0200, Baruch Siach wrote:
> Build with musl libc needs the sys/types.h header for the dev_t type,
> since this header is not included indirectly. This fixes the following
> build failure:
> 
> In file included from convert/source-fs.c:23:0:
> ./convert/source-fs.h:112:1: error: unknown type name ‘dev_t’
>  dev_t decode_dev(u32 dev);
>  ^~~~~
> convert/source-fs.c:31:1: error: unknown type name ‘dev_t’
>  dev_t decode_dev(u32 dev)
>  ^~~~~
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/convert/source-fs.h b/convert/source-fs.h
index 23f33567b42d..4e5babefe6a2 100644
--- a/convert/source-fs.h
+++ b/convert/source-fs.h
@@ -19,6 +19,7 @@ 
 
 #include "kerncompat.h"
 #include <linux/kdev_t.h>
+#include <sys/types.h>
 #include <pthread.h>
 
 #define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID