divert: unbreak the LINT-NOIP build

Only expose `dcb` when either `INET` or `INET6` is defined.

Reported by:	clang (`-Wunused`)
MFC after:	1 week
Fixes 5547a7bb39 ("divert: Use a better source identifier...")
Differential Revision: https://reviews.freebsd.org/D55548

(cherry picked from commit bd758ebac3272f720c051570e043e4bc653dcd48)
This commit is contained in:
Enji Cooper 2026-02-26 15:06:36 -08:00 committed by Franco Fichtner
parent 21c327af86
commit 819191d98b

View file

@ -530,10 +530,11 @@ static int
div_output_inbound(int family, struct socket *so, struct mbuf *m,
struct sockaddr_in *sin)
{
struct divcb *dcb;
#if defined(INET) || defined(INET6)
struct divcb *dcb = so->so_pcb;
#endif
struct ifaddr *ifa;
dcb = so->so_pcb;
if (m->m_pkthdr.rcvif == NULL) {
/*
* No luck with the name, check by IP address.