Skip to content

Commit

Permalink
Fix compilation on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd committed Aug 2, 2023
1 parent 5f38bf1 commit 0ca6380
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/data/compression_options_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@

#include "../../include/sqsh_data_private.h"

#if defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif

struct SQSH_UNALIGNED SqshDataCompressionOptionsGzip {
uint32_t compression_level;
Expand Down
4 changes: 4 additions & 0 deletions lib/data/directory_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@

#include "../../include/sqsh_data_private.h"

#if defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif

struct SQSH_UNALIGNED SqshDataDirectoryEntry {
uint16_t offset;
Expand Down
4 changes: 4 additions & 0 deletions lib/data/fragment_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@

#include "../../include/sqsh_data_private.h"

#if defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif

struct SQSH_UNALIGNED SqshDataFragment {
uint64_t start;
Expand Down
4 changes: 4 additions & 0 deletions lib/data/inode_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@

#include "../../include/sqsh_data_private.h"

#if defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif

struct SQSH_UNALIGNED SqshDataInodeDirectoryIndex {
uint32_t index;
Expand Down
4 changes: 4 additions & 0 deletions lib/data/metablock_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@

#include "../../include/sqsh_data_private.h"

#if defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif

struct SQSH_UNALIGNED SqshDataMetablock {
uint16_t header;
Expand Down
4 changes: 4 additions & 0 deletions lib/data/superblock_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@

#include "../../include/sqsh_data_private.h"

#if defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif

struct SQSH_UNALIGNED SqshDataSuperblock {
uint32_t magic;
Expand Down
5 changes: 5 additions & 0 deletions lib/data/xattr_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@

#include "../../include/sqsh_data_private.h"

#if defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif

#include <string.h>

struct SQSH_UNALIGNED SqshDataXattrKey {
Expand Down

0 comments on commit 0ca6380

Please sign in to comment.