summaryrefslogtreecommitdiff
path: root/meta/recipes-extended/mdadm/files
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2015-03-15 09:02:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-20 23:51:25 +0000
commit753994a2016758ec058822d727b05ef9532b97c8 (patch)
treece3ba03a31205357c24a61552a4a955010707185 /meta/recipes-extended/mdadm/files
parent294adc0907a359d9c0ad260823188145aab294ad (diff)
downloadopenembedded-core-753994a2016758ec058822d727b05ef9532b97c8.tar.gz
openembedded-core-753994a2016758ec058822d727b05ef9532b97c8.tar.bz2
openembedded-core-753994a2016758ec058822d727b05ef9532b97c8.zip
mdadm: Fix build in x32 ABI
Add a patch for fix build in x32 ABI, the fail is cause by time_t printf because time_t is long int in x64 and long long int in x32. [YOCTO #7422] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/mdadm/files')
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
new file mode 100644
index 0000000000..143a8d952e
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch
@@ -0,0 +1,26 @@
+When try to print time_t values as a long int it causes an error because time_t
+data type in x32 ABI is long long int.
+
+Upstream-Status: Pending
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
+diff --git a/monitor.c b/monitor.c
+index f81e707..19ea041 100644
+--- a/monitor.c
++++ b/monitor.c
+@@ -260,8 +260,13 @@ static int read_and_act(struct active_array *a)
+ }
+
+ gettimeofday(&tv, NULL);
++#if defined(__x86_64__) && defined(__ILP32__)
++ dprintf("%s(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n",
++#else
+ dprintf("%s(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
+- __func__, a->info.container_member,
++#endif
++ __func__,
++ a->info.container_member,
+ tv.tv_sec, tv.tv_usec,
+ array_states[a->curr_state],
+ array_states[a->prev_state],