git: 412bdb5a4630 - main - route: fix NOIP builds

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Wed, 03 Aug 2022 21:23:50 UTC
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=412bdb5a4630eb74c8aa288e60693771c1e16310

commit 412bdb5a4630eb74c8aa288e60693771c1e16310
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-08-03 21:23:32 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-08-03 21:23:32 +0000

    route: fix NOIP builds
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/net/route/route_helpers.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/net/route/route_helpers.c b/sys/net/route/route_helpers.c
index 5472465d4f5f..13cd4e657e88 100644
--- a/sys/net/route/route_helpers.c
+++ b/sys/net/route/route_helpers.c
@@ -571,9 +571,11 @@ rt_get_inet6_parent(uint32_t fibnum, const struct in6_addr *paddr, int plen)
 char *
 rt_print_buf(const struct rtentry *rt, char *buf, size_t bufsize)
 {
+#if defined(INET) || defined(INET6)
 	char abuf[INET6_ADDRSTRLEN];
 	uint32_t scopeid;
 	int plen;
+#endif
 
 	switch (rt_get_family(rt)) {
 #ifdef INET