Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From e37f7f6a0f1ef1b594574d11a8b90b8c861d047b Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> |
| 3 | Date: Sun, 15 Mar 2015 09:02:14 +0000 |
| 4 | Subject: [PATCH] mdadm: Fix build in x32 ABI |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | When try to print time_t values as a long int it causes an error because time_t |
| 10 | data type in x32 ABI is long long int. |
| 11 | |
| 12 | Upstream-Status: Pending |
| 13 | |
| 14 | Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> |
| 15 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | --- |
| 17 | monitor.c | 5 ++++- |
| 18 | 1 file changed, 4 insertions(+), 1 deletion(-) |
| 19 | |
| 20 | diff --git a/monitor.c b/monitor.c |
| 21 | index 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 25 | if (FD_ISSET(mdi->bb_fd, fds)) |
| 26 | check_for_cleared_bb(a, mdi); |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | } |
| 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], |