[Bug 2407] platform.h fails to detect endianess on Mac OS X 10.6

bugzilla at busybox.net bugzilla at busybox.net
Mon Aug 16 01:18:48 UTC 2010


https://bugs.busybox.net/show_bug.cgi?id=2407

--- Comment #2 from Joe Roback <openwrt-devel at roback.cc>  ---
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

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list