Deal with proper format for printing time_t.

Reported by:	ache
MFC after:	3 weeks
This commit is contained in:
Konstantin Belousov 2010-07-31 17:41:58 +00:00
parent 1e634b7b65
commit bc9bbbe02c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=210696

View File

@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <err.h>
#include <limits.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@ -131,9 +132,10 @@ main(int argc, char *argv[])
* Reporting does not bother with
* fractions of a second...
*/
warnx("about %ld second(s) left"
" out of the original %ld",
time_to_sleep.tv_sec, original);
warnx("about %jd second(s) left"
" out of the original %jd",
(intmax_t)time_to_sleep.tv_sec,
(intmax_t)original);
report_requested = 0;
} else
break;