From 88ae02802bdfed0354ad31b99583dbf7e36b2eb6 Mon Sep 17 00:00:00 2001 From: rmacklem Date: Mon, 6 May 2019 03:20:02 +0000 Subject: [PATCH] MFC: r346856 Add #ifdef INET6 around declaration of nbuf. It was reported that without #ifdef INET6 around the declaration of "nbuf", a build would report an unused variable. For some reason, I didn't see that warning when I did a build, but it seems reasonable to add these #ifdef INET6's. git-svn-id: svn://svn.freebsd.org/base/stable/10@347174 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.sbin/nfsdumpstate/nfsdumpstate.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/nfsdumpstate/nfsdumpstate.c b/usr.sbin/nfsdumpstate/nfsdumpstate.c index 5d5c8816d..4334a3ddf 100644 --- a/usr.sbin/nfsdumpstate/nfsdumpstate.c +++ b/usr.sbin/nfsdumpstate/nfsdumpstate.c @@ -121,7 +121,9 @@ dump_openstate(void) { struct nfsd_dumplist dumplist; int cnt, i; +#ifdef INET6 char nbuf[INET6_ADDRSTRLEN]; +#endif dumplist.ndl_size = DUMPSIZE; dumplist.ndl_list = (void *)dp; @@ -176,7 +178,9 @@ dump_lockstate(char *fname) { struct nfsd_dumplocklist dumplocklist; int cnt, i; +#ifdef INET6 char nbuf[INET6_ADDRSTRLEN]; +#endif dumplocklist.ndllck_size = DUMPSIZE; dumplocklist.ndllck_list = (void *)lp; -- 2.42.0