Big endian fix for Solaris Sparc courtesy of joelfredrikson.

This commit is contained in:
Con Kolivas 2016-06-09 09:47:13 +10:00
parent 3dfcde4a82
commit b8c1e9ca63
2 changed files with 5 additions and 1 deletions

View file

@ -67,6 +67,10 @@ void *alloca (size_t);
# include <sys/endian.h>
#endif
#ifndef __BYTE_ORDER
# ifndef __BIG_ENDIAN
# define __BIG_ENDIAN 4321
# define __LITTLE_ENDIAN 1234
# endif
# ifdef WORDS_BIGENDIAN
# define __BYTE_ORDER __BIG_ENDIAN
# else

2
rzip.c
View file

@ -772,7 +772,7 @@ static inline void init_hash_indexes(struct rzip_state *st)
st->hash_index[i] = ((random() << 16) ^ random());
}
#if defined(__APPLE__) || defined(__FreeBSD__)
#if !defined(__linux)
# define mremap fake_mremap
static inline void *fake_mremap(void *old_address, size_t old_size, size_t new_size, int flags __UNUSED__)