mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 11:02:44 +00:00
tv_sec in timeval is a long, and a time_t is not necessarily a long.
This commit is contained in:
parent
ea565b5141
commit
070a701183
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35874
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user