git: 99ea21744b9f - main - netlink: fix bulding with NOINET6

From: Alexander V. Chernikov <melifaro_at_FreeBSD.org>
Date: Sat, 27 May 2023 10:46:36 UTC
The branch main has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=99ea21744b9ff306cf870be6f8899c66352e185f

commit 99ea21744b9ff306cf870be6f8899c66352e185f
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2023-05-27 10:46:25 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-05-27 10:46:25 +0000

    netlink: fix bulding with NOINET6
---
 sys/netlink/route/iface.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c
index e7a66a3d32fc..e40d7097ca61 100644
--- a/sys/netlink/route/iface.c
+++ b/sys/netlink/route/iface.c
@@ -1257,7 +1257,9 @@ rtnl_handle_addr(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *npt)
 		    attrs.ifa_index);
 		return (ENOENT);
 	}
+#ifdef INET6
 	int if_flags = if_getflags(ifp);
+#endif
 
 #if defined(INET) || defined(INET6)
 	bool new = hdr->nlmsg_type == NL_RTM_NEWADDR;