X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=toolchain%2Futils%2Fsrc%2Fsstrip.c;h=60c12c972c8ef2979beaac73486ce4d23ff763c0;hb=51d00fe8ce98224c2196afb1faed5b124aeb479f;hp=e820a44b88bb1229d89f92251103161f1e809315;hpb=f77b88d124ea1c900f9cf5e04046939aad48bbe1;p=openwrt-10.03%2F.git diff --git a/toolchain/utils/src/sstrip.c b/toolchain/utils/src/sstrip.c index e820a44b8..60c12c972 100644 --- a/toolchain/utils/src/sstrip.c +++ b/toolchain/utils/src/sstrip.c @@ -59,6 +59,7 @@ #include #include #include + #ifdef __FreeBSD__ /** * This seems to work on FreeBSD 5.3, should @@ -71,10 +72,18 @@ #define bswap_64 __bswap64 #define bswap_32 __bswap32 #define bswap_16 __bswap16 +#elif defined(__APPLE__) +#include +#include +#define __BYTE_ORDER BYTE_ORDER +#define __BIG_ENDIAN BIG_ENDIAN +#define bswap_16(x) NXSwapShort(x) +#define bswap_32(x) NXSwapInt(x) +#define bswap_64(x) NXSwapLongLong(x) #else #include #include -#endif /* defined(__FreeBSD__) */ +#endif #ifndef TRUE