Skip to content

Commit ef4bbf3

Browse files
committed
Merge pull request #3 from firstEncounter/master
Fix build for Clang/LLVM
2 parents 556fbe1 + c3c94c6 commit ef4bbf3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

source/types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ typedef uint8_t u8;
2424
#define __ORDER_BIG_ENDIAN__ BIG_ENDIAN
2525
#endif
2626

27+
#ifndef __llvm__
2728
static inline uint16_t __builtin_bswap16(uint16_t x)
2829
{
2930
return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
@@ -43,6 +44,7 @@ static inline uint64_t __builtin_bswap64(uint64_t x)
4344
((uint64_t)__builtin_bswap32(x&0xFFFFFFFF) << 32);
4445
}
4546
#endif
47+
#endif
4648

4749
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
4850
#define be_dword(a) __builtin_bswap64(a)

0 commit comments

Comments
 (0)