diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-03-22 07:56:17 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-24 21:44:26 +0000 |
commit | 364f625480dca41d2902e209e4bfb675b1a93dce (patch) | |
tree | fc0a15f13e32f707e93d2f5019b78dc0dd81607a /meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch | |
parent | 7c1e53bb802f021f06231243077d0e007a64274c (diff) | |
download | openembedded-core-contrib-364f625480dca41d2902e209e4bfb675b1a93dce.tar.gz |
pixz: Fix build on big-endian/musl systems
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch')
-rw-r--r-- | meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch b/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch new file mode 100644 index 0000000000..6b615988db --- /dev/null +++ b/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch @@ -0,0 +1,47 @@ +From 5f3a535987bae4c3e3d9e9079c7526e399f7aecd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 22 Mar 2016 07:42:39 +0000 +Subject: [PATCH 2/2] endian: Use macro bswap_64 instead of __bswap_64 + +byteswap.h defines then as public APIs on all libc +on linux including musl + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Submitted + src/endian.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/endian.c b/src/endian.c +index b7724f3..51aea58 100644 +--- a/src/endian.c ++++ b/src/endian.c +@@ -15,6 +15,7 @@ void xle64enc(uint8_t *d, uint64_t n) { + #include <stdint.h> + #ifdef __linux__ + #include <endian.h> ++ #include <byteswap.h> + #else + #include <sys/endian.h> + #endif +@@ -23,7 +24,7 @@ void xle64enc(uint8_t *d, uint64_t n) { + # if __BYTE_ORDER == __LITTLE_ENDIAN + # define htole64(x) (x) + # else +-# define htole64(x) __bswap_64 (x) ++# define htole64(x) bswap_64 (x) + # endif + #endif + +@@ -31,7 +32,7 @@ void xle64enc(uint8_t *d, uint64_t n) { + # if __BYTE_ORDER == __LITTLE_ENDIAN + # define le64toh(x) (x) + # else +-# define le64toh(x) __bswap_64 (x) ++# define le64toh(x) bswap_64 (x) + # endif + #endif + +-- +1.8.3.1 + |