git: 23566768d92a - stable/13 - syslogd: fix WITHOUT_INET builds

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 29 Nov 2021 15:11:30 UTC
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=23566768d92aed2a59d3e5d9392824cbe83b867f

commit 23566768d92aed2a59d3e5d9392824cbe83b867f
Author:     Artem Khramov <akhramov@pm.me>
AuthorDate: 2021-06-12 17:21:13 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2021-11-29 15:10:53 +0000

    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
---
 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 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) {