aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/watchdogd
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2013-07-28 16:56:31 +0000
committerIan Lepore <ian@FreeBSD.org>2013-07-28 16:56:31 +0000
commit232b79f5f7fd10d7d07426958efcc56d4f0d9be2 (patch)
tree41a748a56a6000d849867b689589b009773d73b1 /usr.sbin/watchdogd
parent0e20ac386303c0928635666e2ffc2c410c8409dc (diff)
downloadsrc-232b79f5f7fd10d7d07426958efcc56d4f0d9be2.tar.gz
src-232b79f5f7fd10d7d07426958efcc56d4f0d9be2.zip
Fix printf of seconds for systems where time_t is 64 bits.
Notes
Notes: svn path=/head/; revision=253744
Diffstat (limited to 'usr.sbin/watchdogd')
-rw-r--r--usr.sbin/watchdogd/watchdogd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c
index 7b6db94736d1..9d405c91b761 100644
--- a/usr.sbin/watchdogd/watchdogd.c
+++ b/usr.sbin/watchdogd/watchdogd.c
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
#include <paths.h>
#include <signal.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
@@ -230,10 +231,10 @@ parse_timeout_to_pow2ns(char opt, const char *longopt, const char *myoptarg)
if (debugging) {
printf("Timeout for %s%s "
"is 2^%d nanoseconds "
- "(in: %s sec -> out: %ld sec %ld ns -> %d ticks)\n",
+ "(in: %s sec -> out: %jd sec %ld ns -> %d ticks)\n",
longopt ? "-" : "", longopt ? longopt : shortopt,
rv,
- myoptarg, ts.tv_sec, ts.tv_nsec, ticks);
+ myoptarg, (intmax_t)ts.tv_sec, ts.tv_nsec, ticks);
}
if (ticks <= 0) {
errx(1, "Timeout for %s%s is too small, please choose a higher timeout.", longopt ? "-" : "", longopt ? longopt : shortopt);