Use __FreeBSD_version to test what things to use

This commit is contained in:
Warner Losh 2002-05-31 03:27:34 +00:00
parent f1c746bb3f
commit 6f20d5e68f
2 changed files with 11 additions and 10 deletions

View File

@ -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 <sys/param.h>
#include <sys/systm.h>
@ -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 <net/bpf.h>
#include <net/bpfdesc.h>
@ -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

View File

@ -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;