summaryrefslogtreecommitdiffstats
path: root/usr.bin/doscmd/bios.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-06-29 17:25:46 +0000
committerbde <bde@FreeBSD.org>1998-06-29 17:25:46 +0000
commite93d50ef3bbcc0974e7290d6bee3abc58e29cfcc (patch)
treee8b64304087065ca7b5551926f81c8a0ba6af52f /usr.bin/doscmd/bios.c
parent122886a1e045b6711c6a11c9d90d10faee896958 (diff)
downloadFreeBSD-src-e93d50ef3bbcc0974e7290d6bee3abc58e29cfcc.zip
FreeBSD-src-e93d50ef3bbcc0974e7290d6bee3abc58e29cfcc.tar.gz
Don't assume that time_t is long.
Diffstat (limited to 'usr.bin/doscmd/bios.c')
-rw-r--r--usr.bin/doscmd/bios.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/doscmd/bios.c b/usr.bin/doscmd/bios.c
index 4cad864..ccfdce8 100644
--- a/usr.bin/doscmd/bios.c
+++ b/usr.bin/doscmd/bios.c
@@ -29,7 +29,7 @@
*
* BSDI bios.c,v 2.3 1996/04/08 19:32:19 bostic Exp
*
- * $Id: bios.c,v 1.1 1997/08/09 01:42:33 dyson Exp $
+ * $Id: bios.c,v 1.2 1997/08/15 23:41:23 jlemon Exp $
*/
#include "doscmd.h"
@@ -168,6 +168,7 @@ bios_init(void)
int i, j, k;
u_char *jtab;
struct timeval tv;
+ time_t tv_sec;
struct timezone tz;
struct tm tm;
u_long vec;
@@ -295,7 +296,8 @@ bios_init(void)
}
gettimeofday(&tv, &tz);
- tm = *localtime(&tv.tv_sec);
+ tv_sec = tv.tv_sec;
+ tm = *localtime(&tv_sec);
*(u_long *)&BIOSDATA[0x6c] =
(((tm.tm_hour * 60 + tm.tm_min) * 60) + tm.tm_sec) * 182 / 10;
OpenPOWER on IntegriCloud