X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/652d9073459fce55104f0db8f64fc5b9100c979d..2964b01abc4f2649ccf41b7d2c22a4ddf83eaabb:/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)