X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/652d9073459fce55104f0db8f64fc5b9100c979d..66663e28094813f57d1d1124bd7397d2189f5ee5:/tools/include/endian.h diff --git a/tools/include/endian.h b/tools/include/endian.h index 4ea34cdd0..0f17b41da 100644 --- a/tools/include/endian.h +++ b/tools/include/endian.h @@ -1,7 +1,8 @@ #ifndef __endian_compat_h #define __endian_compat_h -#if defined(__linux__) +#if defined(__linux__) || defined(__CYGWIN__) +#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)