blob: ecd1f037d01a74ad9993f76cdf25f6efebff7115 [file] [log] [blame]
Patrick Williams44b3caf2024-04-12 16:51:14 -05001From ca91d9fc07943f209988411f2596e4b69828f208 Mon Sep 17 00:00:00 2001
Brad Bishop19323692019-04-05 15:28:33 -04002From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
3Date: Sun, 15 Mar 2015 09:02:14 +0000
4Subject: [PATCH] mdadm: Fix build in x32 ABI
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009When try to print time_t values as a long int it causes an error because time_t
10data type in x32 ABI is long long int.
11
12Upstream-Status: Pending
13
14Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Brad Bishop19323692019-04-05 15:28:33 -040015---
16 monitor.c | 5 ++++-
17 1 file changed, 4 insertions(+), 1 deletion(-)
18
19diff --git a/monitor.c b/monitor.c
Patrick Williams44b3caf2024-04-12 16:51:14 -050020index 4acec67..8dcdfd6 100644
Brad Bishop19323692019-04-05 15:28:33 -040021--- a/monitor.c
22+++ b/monitor.c
Patrick Williams44b3caf2024-04-12 16:51:14 -050023@@ -447,9 +447,12 @@ static int read_and_act(struct active_array *a, fd_set *fds)
Brad Bishop316dfdd2018-06-25 12:45:53 -040024 if (FD_ISSET(mdi->bb_fd, fds))
25 check_for_cleared_bb(a, mdi);
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026 }
27-
28 gettimeofday(&tv, NULL);
29+#if defined(__x86_64__) && defined(__ILP32__)
30+ dprintf("(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n",
31+#else
32 dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
33+#endif
34 a->info.container_member,
35 tv.tv_sec, tv.tv_usec,
36 array_states[a->curr_state],