Unbreak buildworld.
authorSascha Wildner <saw@online.de>
Sun, 3 Jan 2010 13:25:32 +0000 (14:25 +0100)
committerSascha Wildner <saw@online.de>
Sun, 3 Jan 2010 13:25:32 +0000 (14:25 +0100)
commitbfc2d750ac919e19b27f24c22cedba1b2ed5351a
tree04525cbd5d24b33c6c1ece69c1d13bf027a4f5ba
parenta74548c795171aff1dcd3c2ba42742318611f1b5
Unbreak buildworld.

The inclusion of <sys/eventvar.h> in <sys/proc.h> in commit
a591f597ce2a2a0d1c8edc23e0445acfbd8a0852 broke some things
in userland.

<kinfo.h> defines _KERNEL_STRUCTURES. If, however, some file included
before <kinfo.h> has code under _KERNEL_STRUCTURES that is needed by
files which come _after_ _KERNEL_STRUCTURES is defined by <kinfo.h>,
we break.

In netstat(1), the solution is to remove the inclusion of <sys/protosw.h>
(which comes in again via <net/netmsg.h> later after <kinfo.h> is
included) in route.c.

In sockstat(1), in lieu of a better solution, we just define
_KERNEL_STRUCTURES early for now.

Reported-by: lentferj
usr.bin/netstat/route.c
usr.bin/sockstat/sockstat.c