summaryrefslogtreecommitdiff
path: root/include/bswap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/bswap.h')
-rw-r--r--include/bswap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/bswap.h b/include/bswap.h
index 4e5b3e2a..e590124c 100644
--- a/include/bswap.h
+++ b/include/bswap.h
@@ -27,6 +27,11 @@
#define bswap_16 bswap16
#define bswap_32 bswap32
#define bswap_64 bswap64
+#elif defined(__OpenBSD__)
+#include <sys/endian.h>
+#define bswap_16 swap16
+#define bswap_32 swap32
+#define bswap_64 swap64
#elif defined (__sun)
#include <sys/byteorder.h>
#define bswap_16 BSWAP_16