aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-04-23 20:35:23 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-27 14:57:44 +0100
commit944f94a32577969ee1fc197ab285b0abd9e541fa (patch)
tree39f09f9b2f3a4da11215284dc3ae300648d7a9bb
parent54fc9c0d1cc5cafa44e4b392ef087900e4102464 (diff)
downloadopenembedded-core-contrib-944f94a32577969ee1fc197ab285b0abd9e541fa.tar.gz
mdadm: Fix inline semantics
With gcc-5 defaulting to gnu11 C we need to follow c99 inline semantics Change-Id: I397520c36c81634556b3f3782aebc532e4a79aed Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/mdadm/files/inline.patch39
-rw-r--r--meta/recipes-extended/mdadm/mdadm_3.3.2.bb1
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-extended/mdadm/files/inline.patch b/meta/recipes-extended/mdadm/files/inline.patch
new file mode 100644
index 0000000000..9009f0650c
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/inline.patch
@@ -0,0 +1,39 @@
+with gnu11 turning on a default with gcc-5 we have to abide by new inline semantics
+using 'inline' and using is in same translation unit means an external definition has to exist
+same like "external inline" in gnu89, we simply make the functions static inline since they
+are just meant to be used in this file
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: mdadm-3.3.2/bitmap.c
+===================================================================
+--- mdadm-3.3.2.orig/bitmap.c
++++ mdadm-3.3.2/bitmap.c
+@@ -20,7 +20,7 @@
+
+ #include "mdadm.h"
+
+-inline void sb_le_to_cpu(bitmap_super_t *sb)
++static inline void sb_le_to_cpu(bitmap_super_t *sb)
+ {
+ sb->magic = __le32_to_cpu(sb->magic);
+ sb->version = __le32_to_cpu(sb->version);
+@@ -34,7 +34,7 @@ inline void sb_le_to_cpu(bitmap_super_t
+ sb->write_behind = __le32_to_cpu(sb->write_behind);
+ }
+
+-inline void sb_cpu_to_le(bitmap_super_t *sb)
++static inline void sb_cpu_to_le(bitmap_super_t *sb)
+ {
+ sb_le_to_cpu(sb); /* these are really the same thing */
+ }
+@@ -74,7 +74,7 @@ typedef struct bitmap_info_s {
+ } bitmap_info_t;
+
+ /* count the dirty bits in the first num_bits of byte */
+-inline int count_dirty_bits_byte(char byte, int num_bits)
++static inline int count_dirty_bits_byte(char byte, int num_bits)
+ {
+ int num = 0;
+
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
index 0742d73ffd..87e06f5a82 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb
@@ -12,6 +12,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
file://mdadm-3.2.2_fix_for_x32.patch \
file://gcc-4.9.patch \
file://mdadm-3.3.2_x32_abi_time_t.patch \
+ file://inline.patch \
file://run-ptest \
"