| Summary: | platform.h fails to detect endianess on Mac OS X 10.6 | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Joe Roback <openwrt> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.17.x | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | compilation fix for Mac OS X with endianess detection in platform.h | ||
|
Description
Joe Roback
2010-08-16 00:57:04 UTC
Can you provide a patch, against 1.17.1, which has a standalone #elif __APPLE__ block, without merging it with other OSes? Sure, no problem. I attached it as well. --- a/include/platform.h 2010-07-05 20:25:54.000000000 -0600 +++ b/include/platform.h 2010-08-15 19:17:00.000000000 -0600 @@ -161,7 +161,14 @@ # define bswap_32 __bswap32 # define bswap_16 __bswap16 # define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN) -#elif !defined __APPLE__ +#elif defined(__APPLE__) +# include <sys/resource.h> /* rlimit */ +# include <machine/endian.h> +# define bswap_64 __bswap64 +# define bswap_32 __bswap32 +# define bswap_16 __bswap16 +# define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN) +#else # include <byteswap.h> # include <endian.h> #endif Created attachment 2347 [details]
compilation fix for Mac OS X with endianess detection in platform.h
forgot to close this bug... fixed in git sometime ago, will be in 1.18.x |