aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2016-02-10 18:35:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-11 12:27:29 +0000
commite1ae012388e4321b95cd79c014af135cf6c419ad (patch)
tree89432a393c750f65c723bc3eaa1f69b321052616 /meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
parent4e94ba3b0b8b476e46441707d3b1ead13da4ea76 (diff)
downloadopenembedded-core-contrib-e1ae012388e4321b95cd79c014af135cf6c419ad.tar.gz
mdadm: update to version 3.4
3.3.4 -> 3.4 a) Removed the following upstreamed patch: 1. 0001-Define-_POSIX_C_SOURCE-if-undefined.patch b) Added following patches to fix uclibc,musl and x32 build failures 1. 0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch 2. 0001-util.c-include-poll.h-instead-of-sys-poll.h.patch 3. 0001-Fix-some-type-comparison-problems.patch 4. 0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch')
-rw-r--r--meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch b/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
new file mode 100644
index 0000000000..1395473981
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
@@ -0,0 +1,55 @@
+From cf14a9987ea1040457ce53bc2ab7d096818cb780 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Fri, 5 Feb 2016 18:06:32 +0200
+Subject: [PATCH] mdadm.h: bswap is already defined in uclibc
+
+Fixes this build error:
+
+| In file included from mdadm.c:28:0:
+| mdadm.h:142:0: error: "bswap_16" redefined [-Werror]
+| #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
+| ^
+
+Upstream-Status: Submitted
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ mdadm.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/mdadm.h b/mdadm.h
+index dd02be7..230e60f 100755
+--- a/mdadm.h
++++ b/mdadm.h
+@@ -139,12 +139,20 @@ struct dlm_lksb {
+ * and there is no standard conversion function so... */
+ /* And dietlibc doesn't think byteswap is ok, so.. */
+ /* #include <byteswap.h> */
++
++#ifndef bswap_16
+ #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
+ ((x) & 0xff00U) >> 8)
++#endif
++
++#ifndef bswap_32
+ #define bswap_32(x) (((x) & 0x000000ffU) << 24 | \
+ ((x) & 0xff000000U) >> 24 | \
+ ((x) & 0x0000ff00U) << 8 | \
+ ((x) & 0x00ff0000U) >> 8)
++#endif
++
++#ifndef bswap_64
+ #define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \
+ ((x) & 0xff00000000000000ULL) >> 56 | \
+ ((x) & 0x000000000000ff00ULL) << 40 | \
+@@ -153,6 +161,7 @@ struct dlm_lksb {
+ ((x) & 0x0000ff0000000000ULL) >> 24 | \
+ ((x) & 0x00000000ff000000ULL) << 8 | \
+ ((x) & 0x000000ff00000000ULL) >> 8)
++#endif
+
+ #if !defined(__KLIBC__)
+ #if BYTE_ORDER == LITTLE_ENDIAN
+--
+2.4.0
+