Skip to content

Commit d836090

Browse files
committed
compat UPDATE byteswap on osx and win
1 parent 804eb23 commit d836090

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compat/compat.h.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@
2626
# include <alloca.h>
2727
#endif
2828

29-
#include <byteswap.h>
29+
#if defined(__APPLE__) || defined(_WIN32)
30+
# define bswap_32 __builtin_bswap32
31+
# define bswap64 __builtin_bswap64
32+
#else
33+
# include <byteswap.h>
34+
#endif
35+
3036
#include <limits.h>
3137
#include <pthread.h>
3238
#include <stdarg.h>

0 commit comments

Comments
 (0)