[PATCH 3/3] monitor.c: Fix build in x32 ABI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Aníbal Limón <anibal.limon@xxxxxxxxxxxxxxx>

When we try to print time_t values as a long int it causes an error
because time_t data type in x32 ABI is long long int.

Signed-off-by: Maxin B. John <maxin.john@xxxxxxxxx>
---
 monitor.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/monitor.c b/monitor.c
index 81537ed..7cd9b8a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -447,7 +447,11 @@ static int read_and_act(struct active_array *a, fd_set *fds)
 	}
 
 	gettimeofday(&tv, NULL);
+#if defined(__x86_64__) && defined(__ILP32__)
+	dprintf("(%d): %lld.%06lld state:%s prev:%s action:%s prev: %s start:%llu\n",
+#else
 	dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
+#endif
 		a->info.container_member,
 		tv.tv_sec, tv.tv_usec,
 		array_states[a->curr_state],
-- 
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux