Skip to content

Commit

Permalink
Merge pull request #31 from probonopd/main
Browse files Browse the repository at this point in the history
Fix compilation on FreeBSD
  • Loading branch information
Gottox authored Aug 2, 2023
2 parents c49a38d + 0ca6380 commit 85b4d3d
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 85b4d3d

Please sign in to comment.