X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/652d9073459fce55104f0db8f64fc5b9100c979d..faec8f09560ab02b3e646d1ea267e3e2f02755f5:/tools/include/endian.h diff --git a/tools/include/endian.h b/tools/include/endian.h index 4ea34cdd0..25d100de3 100644 --- a/tools/include/endian.h +++ b/tools/include/endian.h @@ -2,6 +2,7 @@ #define __endian_compat_h #if defined(__linux__) +#include #include_next #elif defined(__APPLE__) #include @@ -9,6 +10,11 @@ #define bswap_16(x) NXSwapShort(x) #define bswap_32(x) NXSwapInt(x) #define bswap_64(x) NXSwapLongLong(x) +#elif defined(__FreeBSD__) +#include +#define bswap_16(x) bswap16(x) +#define bswap_32(x) bswap32(x) +#define bswap_64(x) bswap64(x) #else #include #define bswap_16(x) swap16(x)