Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jun 2021 04:28:13 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: f06fa6f88733 - main - syslogd: fix WITHOUT_INET builds
Message-ID:  <202106130428.15D4SDtT066519@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

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

commit f06fa6f88733d709a5f9dd3a27b1a08571e49e6b
Author:     Artem Khramov <akhramov@pm.me>
AuthorDate: 2021-06-12 17:21:13 +0000
Commit:     Warner Losh <imp@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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106130428.15D4SDtT066519>