summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-05-09 09:41:30 +0000
committerjb <jb@FreeBSD.org>1998-05-09 09:41:30 +0000
commitae8864f6a2cd45a092cef69bbb1ebd295188447f (patch)
tree10e11203159cac63169ea7013404d9e551820e5f /games
parent88c50b200adc9431a2204fb3e5b24f92ff93b0e9 (diff)
downloadFreeBSD-src-ae8864f6a2cd45a092cef69bbb1ebd295188447f.zip
FreeBSD-src-ae8864f6a2cd45a092cef69bbb1ebd295188447f.tar.gz
tv_sec in timeval is a long, and a time_t is not necessarily a long.
Diffstat (limited to 'games')
-rw-r--r--games/battlestar/com6.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/games/battlestar/com6.c b/games/battlestar/com6.c
index 5d19631..ddfac67 100644
--- a/games/battlestar/com6.c
+++ b/games/battlestar/com6.c
@@ -103,11 +103,13 @@ post(ch)
char ch;
{
struct timeval tv;
- char *date, *ctime();
+ char *date;
+ time_t tvsec;
int s = sigblock(sigmask(SIGINT));
gettimeofday(&tv, (struct timezone *)0); /* can't call time */
- date = ctime(&tv.tv_sec);
+ tvsec = (time_t) tv.tv_sec;
+ date = ctime(&tvsec);
date[24] = '\0';
fprintf(score_fp, "%s %8s %c%20s", date, uname, ch, rate());
OpenPOWER on IntegriCloud