From: Ilya Leoshkevich Date: Tue, 26 Mar 2019 12:06:36 +0000 (+0100) Subject: Fix endianness detection in memcopy.h X-Git-Tag: 1.9.9-b1~497 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cde1daff92c8a31b5c6cbd5362181f29f153e375;p=thirdparty%2Fzlib-ng.git Fix endianness detection in memcopy.h When memcopy.h is included into inffast.c, endianness-related preperocessor defines are not set, which leads to BYTE_ORDER == LITTLE_ENDIAN condition being always true. This breaks decompression at least on s390x. --- diff --git a/memcopy.h b/memcopy.h index e0e82c7a..9ce39110 100644 --- a/memcopy.h +++ b/memcopy.h @@ -4,6 +4,8 @@ #ifndef MEMCOPY_H_ #define MEMCOPY_H_ + #include "gzendian.h" + /* Load 64 bits from IN and place the bytes at offset BITS in the result. */ static inline uint64_t load_64_bits(const unsigned char *in, unsigned bits) { uint64_t chunk;