summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-04-17 15:02:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-04-17 15:02:39 +0000
commita58aaea99d82ed599d688741941fb795729aaee4 (patch)
tree9ae6390306a38369d8e1fb6a023bc5c05d855be3
parent2d0e78e3606e89f11c563e064f0134cdf10d015c (diff)
large time_t problems
ok gilles
-rw-r--r--usr.sbin/smtpd/queue_backend.c6
-rw-r--r--usr.sbin/smtpd/smtpctl.c8
-rw-r--r--usr.sbin/smtpd/smtpd.c6
3 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/smtpd/queue_backend.c b/usr.sbin/smtpd/queue_backend.c
index 84b91953d79..9eb9693e0e6 100644
--- a/usr.sbin/smtpd/queue_backend.c
+++ b/usr.sbin/smtpd/queue_backend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue_backend.c,v 1.42 2013/01/26 09:37:23 gilles Exp $ */
+/* $OpenBSD: queue_backend.c,v 1.43 2013/04/17 15:02:38 deraadt Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
@@ -73,8 +73,8 @@ static inline void profile_leave(void)
clock_gettime(CLOCK_MONOTONIC, &t1);
timespecsub(&t1, &profile.t0, &dt);
- log_debug("profile-queue: %s %li.%06li", profile.name,
- dt.tv_sec * 1000000 + dt.tv_nsec / 1000000,
+ log_debug("profile-queue: %s %lld.%06li", profile.name,
+ (long long)dt.tv_sec * 1000000 + dt.tv_nsec / 1000000,
dt.tv_nsec % 1000000);
}
#else
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c
index fabb423d00e..78aaa26ab12 100644
--- a/usr.sbin/smtpd/smtpctl.c
+++ b/usr.sbin/smtpd/smtpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpctl.c,v 1.102 2013/04/12 18:22:49 eric Exp $ */
+/* $OpenBSD: smtpctl.c,v 1.103 2013/04/17 15:02:38 deraadt Exp $ */
/*
* Copyright (c) 2006 Gilles Chehade <gilles@poolp.org>
@@ -583,7 +583,7 @@ show_stats_output(void)
if (strcmp(kvp->key, "uptime") == 0) {
duration = time(NULL) - kvp->val.u.counter;
- printf("uptime=%zd\n", (size_t)duration);
+ printf("uptime=%lld\n", (long long)duration);
printf("uptime.human=%s\n",
duration_to_text(duration));
}
@@ -598,8 +598,8 @@ show_stats_output(void)
kvp->key, (int64_t)kvp->val.u.timestamp);
break;
case STAT_TIMEVAL:
- printf("%s=%zd.%zd\n",
- kvp->key, kvp->val.u.tv.tv_sec,
+ printf("%s=%lld.%ld\n",
+ kvp->key, (long long)kvp->val.u.tv.tv_sec,
kvp->val.u.tv.tv_usec);
break;
case STAT_TIMESPEC:
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index f2e21b3adcb..0788c81c6d8 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.189 2013/04/12 18:22:49 eric Exp $ */
+/* $OpenBSD: smtpd.c,v 1.190 2013/04/17 15:02:38 deraadt Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1302,12 +1302,12 @@ imsg_dispatch(struct mproc *p, struct imsg *imsg)
clock_gettime(CLOCK_MONOTONIC, &t1);
timespecsub(&t1, &t0, &dt);
- log_debug("profile-imsg: %s %s %s %i %li.%06li",
+ log_debug("profile-imsg: %s %s %s %i %lld.%06li",
proc_name(smtpd_process),
proc_name(p->proc),
imsg_to_str(imsg->hdr.type),
(int)imsg->hdr.len,
- dt.tv_sec * 1000000 + dt.tv_nsec / 1000000,
+ (long long)dt.tv_sec * 1000000 + dt.tv_nsec / 1000000,
dt.tv_nsec % 1000000);
if (profiling & PROFILE_TOSTAT) {