--- src/common_interface.old.c 2010-07-12 00:32:05.000000000 -0400 +++ src/common_interface.c 2012-05-21 17:04:32.000000000 -0400 @@ -52,7 +52,6 @@ #endif /* linux */ #elif defined(__sun) - #include #ifdef _BIG_ENDIAN @@ -67,6 +66,21 @@ # define HTOLE_32(x) (x) #endif /* Solaris */ +#elif defined(__APPLE__) +#include + +#ifdef __BIG_ENDIAN__ +# define LETOH_16(x) OSSwapInt16(x) +# define HTOLE_16(x) OSSwapInt16(x) +# define LETOH_32(x) OSSwapInt32(x) +# define HTOLE_32(x) OSSwapInt32(x) +#else +# define LETOH_16(x) (x) +# define HTOLE_16(x) (x) +# define LETOH_32(x) (x) +# define HTOLE_32(x) (x) +#endif /* Apple */ + #else #include