From 3732fdec0a22a6d8de7f9a9858c60b8e492d2dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Sun, 15 Mar 2015 09:02:14 +0000 Subject: mdadm: Fix build in x32 ABI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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] (From OE-Core rev: 753994a2016758ec058822d727b05ef9532b97c8) Signed-off-by: Aníbal Limón Signed-off-by: Richard Purdie --- .../mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch | 26 ++++++++++++++++++++++ meta/recipes-extended/mdadm/mdadm_3.3.2.bb | 1 + 2 files changed, 27 insertions(+) create mode 100644 meta/recipes-extended/mdadm/files/mdadm-3.3.2_x32_abi_time_t.patch (limited to 'meta') 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 0000000..143a8d9 --- /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 + +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], diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb index 7140990..c6a5635 100644 --- a/meta/recipes-extended/mdadm/mdadm_3.3.2.bb +++ b/meta/recipes-extended/mdadm/mdadm_3.3.2.bb @@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 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 \ " SRC_URI[md5sum] = "44698d351501cac6a89072dc877eb220" -- cgit v1.1