summaryrefslogtreecommitdiff
path: root/crc32.c
diff options
context:
space:
mode:
authorEvan Nemerson <evan@nemerson.com>2015-09-29 08:34:28 -0700
committerHans Kristian Rosbach <hk-git@circlestorm.org>2015-11-25 16:06:30 +0100
commitca7d031dadc0c49a3e3c9444448a52757ffbbc6d (patch)
treec6b473d00b0246c6db19a9c85f2718726c829598 /crc32.c
parent5428df7b783825bf97cce04053375e6c7afa39cb (diff)
Fix compilation on BSD
The endianness functions are in <sys/endian.h>, not <endian.h> as they are in Linux.
Diffstat (limited to 'crc32.c')
-rw-r--r--crc32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crc32.c b/crc32.c
index 76f7a8a..7ab796d 100644
--- a/crc32.c
+++ b/crc32.c
@@ -23,6 +23,8 @@
# endif
#elif __APPLE__
# include <machine/endian.h>
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragoFly__)
+# include <sys/endian.h>
#else
# include <endian.h>
#endif