[traceroute6] Don't do the casper bits when we're not doing casper

This with the previous patch I committed makes traceroute6/traceroute
compile fine when libcasper isn't enabled.

This complains strongly with unused variables and such when compiled
with gcc-6 on mips32.

Tested:

* compiled/run on mips32 hardware (AR9344)

Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D26773
This commit is contained in:
adrian 2020-10-14 00:01:17 +00:00
parent a2edf85a4e
commit e472cf036c

View File

@ -1527,8 +1527,9 @@ get_uphdr(struct ip6_hdr *ip6, u_char *lim)
}
void
capdns_open()
capdns_open(void)
{
#ifdef WITH_CASPER
const char *types[] = { "NAME", "ADDR" };
int families[1];
cap_channel_t *casper;
@ -1545,6 +1546,7 @@ capdns_open()
if (cap_dns_family_limit(capdns, families, nitems(families)) < 0)
errx(1, "unable to limit access to system.dns service");
cap_close(casper);
#endif /* WITH_CASPER */
}
void