From f06fa6f88733d709a5f9dd3a27b1a08571e49e6b Mon Sep 17 00:00:00 2001 From: Artem Khramov Date: Sat, 12 Jun 2021 20:21:13 +0300 Subject: [PATCH] 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) --- usr.sbin/syslogd/syslogd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index d8a2c0a5680ec7..1837c41c4e8b50 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1867,8 +1867,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) {