Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | When try to print time_t values as a long int it causes an error because time_t |
| 2 | data type in x32 ABI is long long int. |
| 3 | |
| 4 | Upstream-Status: Pending |
| 5 | |
| 6 | Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> |
| 7 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 8 | Index: mdadm-4.0/monitor.c |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | =================================================================== |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 10 | --- mdadm-4.0.orig/monitor.c |
| 11 | +++ mdadm-4.0/monitor.c |
| 12 | @@ -445,9 +445,12 @@ static int read_and_act(struct active_ar |
| 13 | if (FD_ISSET(mdi->bb_fd, fds)) |
| 14 | check_for_cleared_bb(a, mdi); |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | } |
| 16 | - |
| 17 | gettimeofday(&tv, NULL); |
| 18 | +#if defined(__x86_64__) && defined(__ILP32__) |
| 19 | + dprintf("(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n", |
| 20 | +#else |
| 21 | dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n", |
| 22 | +#endif |
| 23 | a->info.container_member, |
| 24 | tv.tv_sec, tv.tv_usec, |
| 25 | array_states[a->curr_state], |