From 5ffafed1dfe75e4833b390fbcbaa583d7a588406 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 6 Apr 2005 21:39:12 +0000 Subject: add some fixes for compiling on mac os x git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@574 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/utils/src/sstrip.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'toolchain/utils/src') 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 -- cgit v1.2.3