fix htobe32 for Apple OSX

This commit is contained in:
John Tromp 2016-10-23 10:55:10 -04:00
parent 11e1bed4ea
commit 392d234731
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,9 @@
#if defined __builtin_bswap32 && defined __LITTLE_ENDIAN
#undef htobe32
#define htobe32(x) __builtin_bswap32(x)
#elif defined __APPLE__
#undef htobe32
#define htobe32(x) OSSwapHostToBigInt32(x)
#endif
typedef uint16_t u16;