summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch')
-rw-r--r--poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch b/poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch
new file mode 100644
index 000000000..6b615988d
--- /dev/null
+++ b/poky/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
+
OpenPOWER on IntegriCloud