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#475
Reviewed by:	imp@ (commit message slightly tweaked)
  • Loading branch information
akhramov authored and bsdimp committed Jun 13, 2021
1 parent 7cf9caf commit f06fa6f
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 f06fa6f

Please sign in to comment.