git: 608749ca473d - stable/14 - divert: unbreak the LINT-NOIP build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 Apr 2026 16:34:16 UTC
The branch stable/14 has been updated by ngie:
URL: https://cgit.FreeBSD.org/src/commit/?id=608749ca473de286ff40447510c201cb8579aee2
commit 608749ca473de286ff40447510c201cb8579aee2
Author: Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-02-26 23:06:36 +0000
Commit: Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-04-25 16:33:22 +0000
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)
---
sys/netinet/ip_divert.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index b9a9f0edc946..849119969c5f 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -502,10 +502,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.