git: 1d41a0555787 - main - Fix kernel build after fcb3f813f379f544f9cd2a10d18045588da0e132 .

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Tue, 04 Oct 2022 14:09:22 UTC
The branch main has been updated by hselasky:

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

commit 1d41a055578704a28b34820e0aaf14a29f28f413
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-10-04 14:08:20 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-10-04 14:08:39 +0000

    Fix kernel build after fcb3f813f379f544f9cd2a10d18045588da0e132 .
    
    By adding missing ifdefs for INET and INET6 when building LINT-NOIP .
    
    Differential Revision:  https://reviews.freebsd.org/D36731
    Sponsored by:   NVIDIA Networking
---
 sys/netlink/route/neigh.c | 2 ++
 sys/netlink/route/route.c | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c
index 44245e14b6b6..076f4bfafdf4 100644
--- a/sys/netlink/route/neigh.c
+++ b/sys/netlink/route/neigh.c
@@ -127,10 +127,12 @@ dump_lle_locked(struct llentry *lle, void *arg)
 	struct nlmsghdr *hdr = &wa->hdr;
 	struct nl_writer *nw = wa->nw;
 	struct ndmsg *ndm;
+#if defined(INET) || defined(INET6)
 	union {
 		struct in_addr	in;
 		struct in6_addr	in6;
 	} addr;
+#endif
 
 	IF_DEBUG_LEVEL(LOG_DEBUG2) {
 		char llebuf[NHOP_PRINT_BUFSIZE];
diff --git a/sys/netlink/route/route.c b/sys/netlink/route/route.c
index 63489dc8173a..7b4fc64ec4bd 100644
--- a/sys/netlink/route/route.c
+++ b/sys/netlink/route/route.c
@@ -282,7 +282,9 @@ dump_px(uint32_t fibnum, const struct nlmsghdr *hdr,
 	nlattr_add_u32(nw, NL_RTA_TABLE, fibnum);
 
 	int plen = 0;
-	uint32_t scopeid = 0;
+#if defined(INET) || defined(INET6)
+	uint32_t scopeid;
+#endif
 	switch (family) {
 #ifdef INET
 	case AF_INET: