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 | |
| 8 | Index: mdadm-3.3.4/monitor.c |
| 9 | =================================================================== |
| 10 | --- mdadm-3.3.4.orig/monitor.c |
| 11 | +++ mdadm-3.3.4/monitor.c |
| 12 | @@ -257,9 +257,12 @@ static int read_and_act(struct active_ar |
| 13 | mdi->curr_state = read_dev_state(mdi->state_fd); |
| 14 | } |
| 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], |