summaryrefslogtreecommitdiffstats
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:50 +0000
commitf0d5478de47cb7dd45141a279f067be869a2f4c5 (patch)
treeb342fcc0c9ddef95918745e9eceed377d0738422 /meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
parent79d5041a9c9ff16ca254d99f87c9ad0f178d48e6 (diff)
downloadpoky-f0d5478de47cb7dd45141a279f067be869a2f4c5.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 (From OE-Core rev: e1ae012388e4321b95cd79c014af135cf6c419ad) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 @@
1From cf14a9987ea1040457ce53bc2ab7d096818cb780 Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Fri, 5 Feb 2016 18:06:32 +0200
4Subject: [PATCH] mdadm.h: bswap is already defined in uclibc
5
6Fixes this build error:
7
8| In file included from mdadm.c:28:0:
9| mdadm.h:142:0: error: "bswap_16" redefined [-Werror]
10| #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
11| ^
12
13Upstream-Status: Submitted
14
15Signed-off-by: Maxin B. John <maxin.john@intel.com>
16---
17 mdadm.h | 9 +++++++++
18 1 file changed, 9 insertions(+)
19
20diff --git a/mdadm.h b/mdadm.h
21index dd02be7..230e60f 100755
22--- a/mdadm.h
23+++ b/mdadm.h
24@@ -139,12 +139,20 @@ struct dlm_lksb {
25 * and there is no standard conversion function so... */
26 /* And dietlibc doesn't think byteswap is ok, so.. */
27 /* #include <byteswap.h> */
28+
29+#ifndef bswap_16
30 #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
31 ((x) & 0xff00U) >> 8)
32+#endif
33+
34+#ifndef bswap_32
35 #define bswap_32(x) (((x) & 0x000000ffU) << 24 | \
36 ((x) & 0xff000000U) >> 24 | \
37 ((x) & 0x0000ff00U) << 8 | \
38 ((x) & 0x00ff0000U) >> 8)
39+#endif
40+
41+#ifndef bswap_64
42 #define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \
43 ((x) & 0xff00000000000000ULL) >> 56 | \
44 ((x) & 0x000000000000ff00ULL) << 40 | \
45@@ -153,6 +161,7 @@ struct dlm_lksb {
46 ((x) & 0x0000ff0000000000ULL) >> 24 | \
47 ((x) & 0x00000000ff000000ULL) << 8 | \
48 ((x) & 0x000000ff00000000ULL) >> 8)
49+#endif
50
51 #if !defined(__KLIBC__)
52 #if BYTE_ORDER == LITTLE_ENDIAN
53--
542.4.0
55