X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/652d9073459fce55104f0db8f64fc5b9100c979d..482253bd2396d1388748110a65a9afbf3d48f8d8:/tools/include/endian.h?ds=sidebyside 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)