Skip to content

Commit

Permalink
syslogd: fix WITHOUT_INET builds
Browse files Browse the repository at this point in the history
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:	freebsd/freebsd-src#475
Reviewed by:	imp@ (commit message slightly tweaked)
  • Loading branch information
akhramov authored and bsdjhb committed Dec 10, 2021
2 parents d3f3f73 + f06fa6f commit 9c708b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions usr.sbin/syslogd/syslogd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9c708b8

Please sign in to comment.