blob: 7a2c888701e20a1c3a66b8589e1cad806c2c7303 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From e37f7f6a0f1ef1b594574d11a8b90b8c861d047b Mon Sep 17 00:00:00 2001
2From: =?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>
15
Brad Bishop19323692019-04-05 15:28:33 -040016---
17 monitor.c | 5 ++++-
18 1 file changed, 4 insertions(+), 1 deletion(-)
19
20diff --git a/monitor.c b/monitor.c
21index 81537ed..7c33382 100644
22--- a/monitor.c
23+++ b/monitor.c
24@@ -445,9 +445,12 @@ static int read_and_act(struct active_array *a, fd_set *fds)
Brad Bishop316dfdd2018-06-25 12:45:53 -040025 if (FD_ISSET(mdi->bb_fd, fds))
26 check_for_cleared_bb(a, mdi);
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027 }
28-
29 gettimeofday(&tv, NULL);
30+#if defined(__x86_64__) && defined(__ILP32__)
31+ dprintf("(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n",
32+#else
33 dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
34+#endif
35 a->info.container_member,
36 tv.tv_sec, tv.tv_usec,
37 array_states[a->curr_state],