blob: c176a49a45d4492098a03dd64df636e63e83e5bc [file] [log] [blame]
#ifndef GSM_ENDIAN_H
#define GSM_ENDIAN_H
#if defined(__linux__)
# include <endian.h>
#elif defined(__APPLE__)
# include <libkern/OSByteOrder.h>
# define htobe16(x) OSSwapHostToBigInt16(x)
# define htobe32(x) OSSwapHostToBigInt32(x)
# define be32toh(x) OSSwapBigToHostInt32(x)
#endif
#endif /* GSM_ENDIAN_H */