diff --git a/zzip/fetch.c b/zzip/fetch.c index 4ae24cc..7af7ab3 100644 --- a/zzip/fetch.c +++ b/zzip/fetch.c @@ -17,7 +17,7 @@ #include #if defined ZZIP_WORDS_BIGENDIAN && \ - defined bswap_16 && defined bswap_32 && defined bswap_64 + defined bswap_16 && defined bswap_32 && defined bswap_64 && !defined(__sparc__) # define __ZZIP_GET16(__p) bswap_16(*(uint16_t*)(__p)) # define __ZZIP_GET32(__p) bswap_32(*(uint32_t*)(__p)) # define __ZZIP_SET16(__p,__x) (*(uint16_t*)(__p) = bswap_16((uint16_t)(__x))) diff --git a/zzip/fetch.h b/zzip/fetch.h index e2c5e9b..45b9c61 100644 --- a/zzip/fetch.h +++ b/zzip/fetch.h @@ -24,7 +24,7 @@ extern uint64_t __zzip_get64(zzip_byte_t * s) __zzip_attribute__((const)); extern void __zzip_set64(zzip_byte_t * s, uint64_t v); #ifdef ZZIP_WORDS_BIGENDIAN -# if defined bswap_16 && defined bswap_32 && defined bswap_64 /* i.e. linux */ +# if defined bswap_16 && defined bswap_32 && defined bswap_64 && !defined(__sparc__) /* i.e. linux */ # define ZZIP_GET16(__p) bswap_16(*(uint16_t*)(__p)) # define ZZIP_GET32(__p) bswap_32(*(uint32_t*)(__p)) # define ZZIP_GET64(__p) bswap_64(*(uint64_t*)(__p))