aports/testing/pixz/endian.patch
2018-02-19 22:33:12 +00:00

27 lines
583 B
Diff

--- pixz-1.0.6.orig/src/endian.c
+++ pixz-1.0.6/src/endian.c
@@ -19,19 +19,19 @@
#include <sys/endian.h>
#endif
-#if !HAVE_DECL_HTOLE64
+#if !HAVE_DECL_HTOLE64 && !defined(htole64)
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define htole64(x) (x)
# else
-# define htole64(x) __bswap_64 (x)
+# define htole64(x) __bswap64 (x)
# endif
#endif
-#if !HAVE_DECL_LE64TOH
+#if !HAVE_DECL_LE64TOH && !defined(le64toh)
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define le64toh(x) (x)
# else
-# define le64toh(x) __bswap_64 (x)
+# define le64toh(x) __bswap64 (x)
# endif
#endif