From a7c513d8dc2f4dc2f9a7ae91736f2f2870f2c892 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 14 Jun 2009 13:27:50 +0000 Subject: Fix utmp time code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to using the antiquated time(2) call the microsecond field of the struct utmp being manipulated was never initialized resulting in random values. On some 64-bit systems this also manifested itself in below warnings. axspawn.c: In function ‘cleanup’: axspawn.c:1017: warning: passing argument 1 of ‘time’ from incompatible pointer type /usr/include/time.h:186: note: expected ‘time_t *’ but argument is of type ‘int32_t *’ [...] axspawn.c: In function ‘main’: [...] axspawn.c:1693: warning: passing argument 1 of ‘time’ from incompatible pointer type /usr/include/time.h:186: note: expected ‘time_t *’ but argument is of type ‘int32_t *’ Fixed by changing it to the recommended initialization sequenze based on gettimeofday(). --- ChangeLog | 1 + 1 file changed, 1 insertion(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 5c5c8b0..7977359 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ ax25-tools (0.0.10) * An IP address is no longer mandatory for nrattach, kissattach. * kissparms now allows to send a raw value to the driver and to set the CRC mode by command line option. + * axspawn now records the time at microsecond accuracy in utmp. -- Ralf Baechle DL5RB Sat, 6 Jun 2009 17:36:01 +0100 -- cgit v1.2.3