From 6f20d5e68fcf46d1ceeea41364a88aa34815a5e4 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 31 May 2002 03:27:34 +0000 Subject: [PATCH] Use __FreeBSD_version to test what things to use --- sys/dev/awi/awi.c | 19 ++++++++++--------- sys/dev/awi/awivar.h | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/dev/awi/awi.c b/sys/dev/awi/awi.c index 0ab059abab26..0fdff7c4528b 100644 --- a/sys/dev/awi/awi.c +++ b/sys/dev/awi/awi.c @@ -86,14 +86,6 @@ */ #include "opt_inet.h" -#if defined(__FreeBSD__) && __FreeBSD__ >= 4 -#define NBPFILTER 1 -#elif defined(__FreeBSD__) && __FreeBSD__ >= 3 -#include "bpf.h" -#define NBPFILTER NBPF -#else -#include "bpfilter.h" -#endif #include #include @@ -134,6 +126,15 @@ #endif #endif +#if defined(__FreeBSD__) && __FreeBSD_version >= 400000 +#define NBPFILTER 1 +#elif defined(__FreeBSD__) && __FreeBSD_version >= 300000 +#include "bpf.h" +#define NBPFILTER NBPF +#else +#include "bpfilter.h" +#endif + #if NBPFILTER > 0 #include #include @@ -464,7 +465,7 @@ awi_ioctl(ifp, cmd, data) u_int8_t tmpstr[IEEE80211_NWID_LEN*2]; #ifdef __FreeBSD_version #if __FreeBSD_version < 500028 - struct proc *mythread = curproc; /* Little lie */ + struct proc *mythread = curproc; /* name a white lie */ #else struct thread *mythread = curthread; #endif diff --git a/sys/dev/awi/awivar.h b/sys/dev/awi/awivar.h index a55b6a759127..0d4a979a9046 100644 --- a/sys/dev/awi/awivar.h +++ b/sys/dev/awi/awivar.h @@ -95,7 +95,7 @@ struct awi_softc void *sc_ih; /* interrupt handler */ #endif #ifdef __FreeBSD__ -#if __FreeBSD__ >= 4 +#if __FreeBSD_version >= 40000 struct { char dv_xname[64]; /*XXX*/ } sc_dev;