Fix linux build

This commit is contained in:
Phillip Stephens 2015-08-30 23:15:08 -07:00
parent 49771b0e15
commit 3c6139947c
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,8 @@
#ifdef _WIN32 #ifdef _WIN32
static inline uint16_t bswap16(uint16_t val) {return _byteswap_ushort(val);} static inline uint16_t bswap16(uint16_t val) {return _byteswap_ushort(val);}
#elif __GNUC__
static inline uint16_t bswap16(uint16_t val) {return __builtin_bswap16(val); }
#else #else
static inline uint16_t bswap16(uint16_t val) {return __builtin_byteswap(val);} static inline uint16_t bswap16(uint16_t val) {return __builtin_byteswap(val);}
#endif #endif