From 4358f31242e93477f15c6d277de2e56b21de8938 Mon Sep 17 00:00:00 2001 From: pkubaj Date: Wed, 14 Sep 2022 08:59:17 +0000 Subject: [PATCH] Fix build on FreeBSD --- common/kaitai/kaitaistream.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/kaitai/kaitaistream.cpp b/common/kaitai/kaitaistream.cpp index e756613..c91493f 100644 --- a/common/kaitai/kaitaistream.cpp +++ b/common/kaitai/kaitaistream.cpp @@ -19,6 +19,11 @@ #define bswap_16(x) _byteswap_ushort(x) #define bswap_32(x) _byteswap_ulong(x) #define bswap_64(x) _byteswap_uint64(x) +#elif defined(__FreeBSD__) +#include +#define bswap_16(x) bswap16(x) +#define bswap_32(x) bswap32(x) +#define bswap_64(x) bswap64(x) #else // !__APPLE__ or !_MSC_VER #include #include