]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix build on ARM and gcc 4.x.
authorMika Lindqvist <postmaster@raasu.org>
Mon, 5 Mar 2018 06:58:14 +0000 (08:58 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 14 Mar 2018 10:42:42 +0000 (11:42 +0100)
gzendian.h
inflate.c

index 267467d1569812bd01b57d94ead4b2058e5ba24c..92da573ba2576274d3a8205fb783bda7029de118 100644 (file)
@@ -15,6 +15,8 @@
 # else
 #  error Unknown endianness!
 # endif
+#elif defined(__linux__)
+# include <endian.h>
 #elif defined(__APPLE__) || defined(__arm__) || defined(__aarch64__)
 # include <machine/endian.h>
 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__)
index 93d1df345a28c025e1aa52da3d6044d9bed9dc52..8b3e930d47c3ef00de1901c8ce2ebd0385cd0732 100644 (file)
--- a/inflate.c
+++ b/inflate.c
@@ -1349,7 +1349,7 @@ int ZEXPORT PREFIX(inflateGetHeader)(PREFIX3(stream) *strm, PREFIX(gz_headerp) h
    called again with more data and the *have state.  *have is initialized to
    zero for the first call.
  */
-static unsigned syncsearch(uint32_t *have, const unsigned char *buf, uint32_t len) {
+static uint32_t syncsearch(uint32_t *have, const unsigned char *buf, uint32_t len) {
     uint32_t got;
     uint32_t next;