diff --git a/sys/net/route.h b/sys/net/route.h index f15be366e51..61f3b29cae9 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -105,6 +105,8 @@ struct mbuf; #include #endif #endif + +#if defined(_KERNEL) || defined(_WANT_RTENTRY) struct rtentry { struct radix_node rt_nodes[2]; /* tree glue, and other values */ /* @@ -127,6 +129,7 @@ struct rtentry { counter_u64_t rt_pksent; /* packets sent using this route */ struct mtx rt_mtx; /* mutex for routing entry */ }; +#endif /* _KERNEL || _WANT_RTENTRY */ /* * Following structure necessary for 4.3 compatibility; diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 56a0f06bd2a..eee5ff7e419 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#define _WANT_RTENTRY #include #include