diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 3d3d079907a6..893abb43fa0b 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -849,7 +849,6 @@ void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); void bpfdetach(struct ifnet *); void bpfilterattach(int); -u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int); static __inline int bpf_peers_present(struct bpf_if *bpf) @@ -878,6 +877,8 @@ bpf_peers_present(struct bpf_if *bpf) } while (0) #endif +u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int); + /* * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). */ diff --git a/sys/net/bpf_filter.c b/sys/net/bpf_filter.c index cac76895f136..38c300137429 100644 --- a/sys/net/bpf_filter.c +++ b/sys/net/bpf_filter.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include -#ifdef sun +#if !defined(_KERNEL) || defined(sun) #include #endif @@ -64,6 +64,8 @@ __FBSDID("$FreeBSD$"); #ifdef _KERNEL #include +#else +#include #endif #include #ifdef _KERNEL