Netstat wants to access kernel internal structures for the kvm walker of
authorclaudio <claudio@openbsd.org>
Wed, 17 Mar 2021 09:03:51 +0000 (09:03 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 17 Mar 2021 09:03:51 +0000 (09:03 +0000)
the routing table.  Define _KERNEL around the net/route.h include.
OK florian@

usr.bin/netstat/route.c

index 5ae4751..dc3a8ca 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: route.c,v 1.106 2020/12/29 19:51:52 benno Exp $       */
+/*     $OpenBSD: route.c,v 1.107 2021/03/17 09:03:51 claudio Exp $     */
 /*     $NetBSD: route.c,v 1.15 1996/05/07 02:55:06 thorpej Exp $       */
 
 /*
@@ -37,7 +37,9 @@
 
 #include <net/if.h>
 #include <net/if_types.h>
+#define _KERNEL
 #include <net/route.h>
+#undef _KERNEL
 #include <netinet/ip_ipsp.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>