]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix compilation on BSD
authorEvan Nemerson <evan@nemerson.com>
Tue, 29 Sep 2015 15:34:28 +0000 (08:34 -0700)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 25 Nov 2015 15:06:30 +0000 (16:06 +0100)
The endianness functions are in <sys/endian.h>, not <endian.h> as
they are in Linux.

crc32.c

diff --git a/crc32.c b/crc32.c
index 76f7a8ac6d53663bc415a7657af133aa79ec4944..7ab796d1267334a611fd58e8d77f001865a7fe22 100644 (file)
--- 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