git: f06fa6f88733 - main - syslogd: fix WITHOUT_INET builds

Warner Losh imp at FreeBSD.org
Sun Jun 13 04:28:14 UTC 2021


The branch main has been updated by imp:

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

commit f06fa6f88733d709a5f9dd3a27b1a08571e49e6b
Author:     Artem Khramov <akhramov at pm.me>
AuthorDate: 2021-06-12 17:21:13 +0000
Commit:     Warner Losh <imp at FreeBSD.org>
CommitDate: 2021-06-13 04:25:35 +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)
---
 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 d8a2c0a5680e..1837c41c4e8b 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) {


More information about the dev-commits-src-all mailing list