diff --git a/configure b/configure index cb952bf..f806682 100755 --- a/configure +++ b/configure @@ -17,11 +17,22 @@ create_darwin_config_h() { cat < src/config.h #ifndef _CONFIG_H #define _CONFIG_H -#include +#include -#ifdef __LITTLE_ENDIAN__ -#define __DO_SWAP_BYTES -#endif /* _DO_SWAP_BYTES */ +#define htobe16(n) OSSwapHostToBigInt16(n) +#define htole16(n) OSSwapHostToLittleInt16(n) +#define be16toh(n) OSSwapBigToHostInt16(n) +#define le16toh(n) OSSwapLittleToHostInt16(n) + +#define htobe32(n) OSSwapHostToBigInt32(n) +#define htole32(n) OSSwapHostToLittleInt32(n) +#define be32toh(n) OSSwapBigToHostInt32(n) +#define le32toh(n) OSSwapLittleToHostInt32(n) + +#define htobe64(n) OSSwapHostToBigInt64(n) +#define htole64(n) OSSwapHostToLittleInt64(n) +#define be64toh(n) OSSwapBigToHostInt64(n) +#define le64toh(n) OSSwapLittleToHostInt64(n) #endif /* _CONFIG_H */ EOF } diff --git a/src/frame.c b/src/frame.c index e4cd565..0886182 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3,6 +3,7 @@ #include #include +#include "config.h" static ssize_t decode_station(patty_ax25_addr *addr, void *data,