diff options
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.patch | 55 |
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 @@ | |||
1 | From cf14a9987ea1040457ce53bc2ab7d096818cb780 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Maxin B. John" <maxin.john@intel.com> | ||
3 | Date: Fri, 5 Feb 2016 18:06:32 +0200 | ||
4 | Subject: [PATCH] mdadm.h: bswap is already defined in uclibc | ||
5 | |||
6 | Fixes 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 | |||
13 | Upstream-Status: Submitted | ||
14 | |||
15 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
16 | --- | ||
17 | mdadm.h | 9 +++++++++ | ||
18 | 1 file changed, 9 insertions(+) | ||
19 | |||
20 | diff --git a/mdadm.h b/mdadm.h | ||
21 | index 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 | -- | ||
54 | 2.4.0 | ||
55 | |||