aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Khramov <akhramov@pm.me>2021-06-12 17:21:13 +0000
committerEd Maste <emaste@FreeBSD.org>2021-11-29 15:10:53 +0000
commit23566768d92aed2a59d3e5d9392824cbe83b867f (patch)
treeab1b38c192edff9dec9b71b94d2ee971a39c9abc
parent3c1222232251e4e3b8bb69434fe7f9ca41444b1d (diff)
syslogd: fix WITHOUT_INET builds
Since 2d82b47 syslogd can't be built with `WITHOUT_INET` or `WITHOUT_INET6` build variables set, because `iovlist_truncate` is not defined but used. This change wraps the problematic `iovlist_truncate` call within ifdef directive. It's compiled out in this situation... Pull Request: https://github.com/freebsd/freebsd-src/pull/475 Reviewed by: imp@ (commit message slightly tweaked) (cherry picked from commit f06fa6f88733d709a5f9dd3a27b1a08571e49e6b) PR: 260098
-rw-r--r--usr.sbin/syslogd/syslogd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index c3b8af4fa8fa..5c2555480d3f 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1861,8 +1861,10 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags)
dprintf("\n");
}
+#if defined(INET) || defined(INET6)
/* Truncate messages to maximum forward length. */
iovlist_truncate(il, MaxForwardLen);
+#endif
lsent = 0;
for (r = f->fu_forw_addr; r; r = r->ai_next) {