Add support for OpenBSD

This commit is contained in:
Tom Davis
2016-07-20 18:19:31 -04:00
parent a0f6e100f1
commit c0366147e8

View File

@@ -19,6 +19,10 @@
# include <libkern/OSByteOrder.h> # include <libkern/OSByteOrder.h>
# define bswap_32 OSSwapInt32 # define bswap_32 OSSwapInt32
# define bswap_64 OSSwapInt64 # define bswap_64 OSSwapInt64
#elif defined(__OpenBSD__)
# include <endian.h>
# define bswap_32 swap32
# define bswap_64 swap64
#else #else
# error "no byteswap.h or libkern/OSByteOrder.h" # error "no byteswap.h or libkern/OSByteOrder.h"
#endif #endif