From 0ca6380939083c40d72a464c185f5b7c2ff09064 Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 2 Aug 2023 03:14:16 +0200 Subject: [PATCH] Fix compilation on FreeBSD --- lib/data/compression_options_data.c | 4 ++++ lib/data/directory_data.c | 4 ++++ lib/data/fragment_data.c | 4 ++++ lib/data/inode_data.c | 4 ++++ lib/data/metablock_data.c | 4 ++++ lib/data/superblock_data.c | 4 ++++ lib/data/xattr_data.c | 5 +++++ 7 files changed, 29 insertions(+) diff --git a/lib/data/compression_options_data.c b/lib/data/compression_options_data.c index 76523625b..b7ce19289 100644 --- a/lib/data/compression_options_data.c +++ b/lib/data/compression_options_data.c @@ -35,7 +35,11 @@ #include "../../include/sqsh_data_private.h" +#if defined(__FreeBSD__) +#include +#else #include +#endif struct SQSH_UNALIGNED SqshDataCompressionOptionsGzip { uint32_t compression_level; diff --git a/lib/data/directory_data.c b/lib/data/directory_data.c index ff96c73f0..6c2f143cb 100644 --- a/lib/data/directory_data.c +++ b/lib/data/directory_data.c @@ -35,7 +35,11 @@ #include "../../include/sqsh_data_private.h" +#if defined(__FreeBSD__) +#include +#else #include +#endif struct SQSH_UNALIGNED SqshDataDirectoryEntry { uint16_t offset; diff --git a/lib/data/fragment_data.c b/lib/data/fragment_data.c index 9e29724d0..c69e92422 100644 --- a/lib/data/fragment_data.c +++ b/lib/data/fragment_data.c @@ -35,7 +35,11 @@ #include "../../include/sqsh_data_private.h" +#if defined(__FreeBSD__) +#include +#else #include +#endif struct SQSH_UNALIGNED SqshDataFragment { uint64_t start; diff --git a/lib/data/inode_data.c b/lib/data/inode_data.c index f126cb6c4..33e6bc271 100644 --- a/lib/data/inode_data.c +++ b/lib/data/inode_data.c @@ -35,7 +35,11 @@ #include "../../include/sqsh_data_private.h" +#if defined(__FreeBSD__) +#include +#else #include +#endif struct SQSH_UNALIGNED SqshDataInodeDirectoryIndex { uint32_t index; diff --git a/lib/data/metablock_data.c b/lib/data/metablock_data.c index 9a46f39ac..c83adff29 100644 --- a/lib/data/metablock_data.c +++ b/lib/data/metablock_data.c @@ -35,7 +35,11 @@ #include "../../include/sqsh_data_private.h" +#if defined(__FreeBSD__) +#include +#else #include +#endif struct SQSH_UNALIGNED SqshDataMetablock { uint16_t header; diff --git a/lib/data/superblock_data.c b/lib/data/superblock_data.c index 7ba992d98..302b7782a 100644 --- a/lib/data/superblock_data.c +++ b/lib/data/superblock_data.c @@ -35,7 +35,11 @@ #include "../../include/sqsh_data_private.h" +#if defined(__FreeBSD__) +#include +#else #include +#endif struct SQSH_UNALIGNED SqshDataSuperblock { uint32_t magic; diff --git a/lib/data/xattr_data.c b/lib/data/xattr_data.c index 8c7c00855..4ab81450e 100644 --- a/lib/data/xattr_data.c +++ b/lib/data/xattr_data.c @@ -35,7 +35,12 @@ #include "../../include/sqsh_data_private.h" +#if defined(__FreeBSD__) +#include +#else #include +#endif + #include struct SQSH_UNALIGNED SqshDataXattrKey {