diff options
author | Omar Polo <op@cvs.openbsd.org> | 2023-05-10 07:20:21 +0000 |
---|---|---|
committer | Omar Polo <op@cvs.openbsd.org> | 2023-05-10 07:20:21 +0000 |
commit | d5a47dff07fcd0131dc1cbd1252660bbf8430b19 (patch) | |
tree | faa7ba131dabfc76f74cf90090659a7c5e80a5d3 /usr.sbin | |
parent | b4c956e2e03b2bf6bb64163c2fc891d51d0e822b (diff) |
cast time_t to long long for printf, reduces the diff with -portable
ok millert@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/lka_filter.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c index 52924139091..0ae45f0ca34 100644 --- a/usr.sbin/smtpd/lka_filter.c +++ b/usr.sbin/smtpd/lka_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_filter.c,v 1.68 2021/06/14 17:58:15 eric Exp $ */ +/* $OpenBSD: lka_filter.c,v 1.69 2023/05/10 07:20:20 op Exp $ */ /* * Copyright (c) 2018 Gilles Chehade <gilles@poolp.org> @@ -933,13 +933,13 @@ filter_protocol_query(struct filter *filter, uint64_t token, uint64_t reqid, con n = io_printf(lka_proc_get_io(filter->proc), "filter|%s|%lld.%06ld|smtp-in|%s|%016"PRIx64"|%016"PRIx64"|%s|%s\n", PROTOCOL_VERSION, - tv.tv_sec, tv.tv_usec, + (long long int)tv.tv_sec, tv.tv_usec, phase, reqid, token, fs->rdns, param); else n = io_printf(lka_proc_get_io(filter->proc), "filter|%s|%lld.%06ld|smtp-in|%s|%016"PRIx64"|%016"PRIx64"|%s\n", PROTOCOL_VERSION, - tv.tv_sec, tv.tv_usec, + (long long int)tv.tv_sec, tv.tv_usec, phase, reqid, token, param); if (n == -1) fatalx("failed to write to processor"); @@ -957,7 +957,7 @@ filter_data_query(struct filter *filter, uint64_t token, uint64_t reqid, const c "filter|%s|%lld.%06ld|smtp-in|data-line|" "%016"PRIx64"|%016"PRIx64"|%s\n", PROTOCOL_VERSION, - tv.tv_sec, tv.tv_usec, + (long long int)tv.tv_sec, tv.tv_usec, reqid, token, line); if (n == -1) fatalx("failed to write to processor"); @@ -1374,8 +1374,9 @@ report_smtp_broadcast(uint64_t reqid, const char *direction, struct timeval *tv, va_start(ap, format); if (io_printf(lka_proc_get_io(rp->name), "report|%s|%lld.%06ld|%s|%s|%016"PRIx64"%s", - PROTOCOL_VERSION, tv->tv_sec, tv->tv_usec, direction, - event, reqid, format[0] != '\n' ? "|" : "") == -1 || + PROTOCOL_VERSION, (long long int)tv->tv_sec, tv->tv_usec, + direction, event, reqid, + format[0] != '\n' ? "|" : "") == -1 || io_vprintf(lka_proc_get_io(rp->name), format, ap) == -1) fatalx("failed to write to processor"); va_end(ap); |