]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix endianness detection in memcopy.h
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 26 Mar 2019 12:06:36 +0000 (13:06 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 27 Mar 2019 11:59:51 +0000 (12:59 +0100)
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.

memcopy.h

index e0e82c7acca3da09eb4edede0d23bf18a444cf78..9ce391106d3f25bdbd3bc72c470fcaa1c0b60150 100644 (file)
--- 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;