git: fda83023cdef - main - jls: low-effort fix to make it compilable with neither inet nor inet6

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Wed, 05 Jul 2023 10:03:30 UTC
The branch main has been updated by mjg:

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

commit fda83023cdefd62ae693cfb853ef204ad4e1d7fb
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2023-07-05 10:01:28 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-07-05 10:03:07 +0000

    jls: low-effort fix to make it compilable with neither inet nor inet6
---
 usr.sbin/jls/jls.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c
index 8773df3cef1c..9d0bebe4855a 100644
--- a/usr.sbin/jls/jls.c
+++ b/usr.sbin/jls/jls.c
@@ -384,7 +384,10 @@ print_jail(int pflags, int jflags)
 {
 	char *nname, *xo_nname;
 	char **param_values;
-	int i, jid, n, spc;
+	int i, jid, spc;
+#if (defined INET || defined INET6)
+	int n;
+#endif
 
 	jid = jailparam_get(params, nparams, jflags);
 	if (jid < 0)
@@ -402,7 +405,9 @@ print_jail(int pflags, int jflags)
 		    (char *)params[3].jp_value,
 		    *(int *)params[4].jp_value ? "DYING" : "ACTIVE");
 		xo_emit("{P:        }{:cpusetid/%d}\n", *(int *)params[5].jp_value);
+#if (defined INET || defined INET6)
 		n = 6;
+#endif
 #ifdef INET
 		if (ip4_ok && !strcmp(params[n].jp_name, "ip4.addr")) {
 			emit_ip_addr_list(AF_INET, "ipv4_addrs", params + n);