diff options
Diffstat (limited to 'tools/include/endian.h')
-rw-r--r-- | tools/include/endian.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/include/endian.h b/tools/include/endian.h index 0f17b41..bba70ab 100644 --- a/tools/include/endian.h +++ b/tools/include/endian.h @@ -15,6 +15,11 @@ #define bswap_16(x) bswap16(x) #define bswap_32(x) bswap32(x) #define bswap_64(x) bswap64(x) +#elif defined(__OpenBSD__) +#include <sys/types.h> +#define bswap_16(x) __swap16(x) +#define bswap_32(x) __swap32(x) +#define bswap_64(x) __swap64(x) #else #include <machine/endian.h> #define bswap_16(x) swap16(x) |