--- lib/libpciaccess/src/common_interface.c-orig 2007-09-22 10:35:52.000000000 +0200 +++ lib/libpciaccess/src/common_interface.c 2007-09-23 20:28:13.000000000 +0200 @@ -57,8 +57,14 @@ #define LETOH_32(x) (x) #define HTOLE_32(x) (x) -#else +#elif defined(__APPLE__) /* Mac OS X */ +#include +#define LETOH_16(x) OSSwapLittleToHostInt16(x) +#define HTOLE_16(x) OSSwapHostToLittleInt16(x) +#define LETOH_32(x) OSSwapLittleToHostInt32(x) +#define HTOLE_32(x) OSSwapHostToLittleInt32(x) +#else #include #define LETOH_16(x) le16toh(x)