Use __FreeBSD_version to test what things to use

This commit is contained in:
imp 2002-05-31 03:27:34 +00:00
parent 331e9d77d6
commit cf0d37c01c
2 changed files with 11 additions and 10 deletions

View File

@ -86,14 +86,6 @@
*/ */
#include "opt_inet.h" #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/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -134,6 +126,15 @@
#endif #endif
#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 #if NBPFILTER > 0
#include <net/bpf.h> #include <net/bpf.h>
#include <net/bpfdesc.h> #include <net/bpfdesc.h>
@ -464,7 +465,7 @@ awi_ioctl(ifp, cmd, data)
u_int8_t tmpstr[IEEE80211_NWID_LEN*2]; u_int8_t tmpstr[IEEE80211_NWID_LEN*2];
#ifdef __FreeBSD_version #ifdef __FreeBSD_version
#if __FreeBSD_version < 500028 #if __FreeBSD_version < 500028
struct proc *mythread = curproc; /* Little lie */ struct proc *mythread = curproc; /* name a white lie */
#else #else
struct thread *mythread = curthread; struct thread *mythread = curthread;
#endif #endif

View File

@ -95,7 +95,7 @@ struct awi_softc
void *sc_ih; /* interrupt handler */ void *sc_ih; /* interrupt handler */
#endif #endif
#ifdef __FreeBSD__ #ifdef __FreeBSD__
#if __FreeBSD__ >= 4 #if __FreeBSD_version >= 40000
struct { struct {
char dv_xname[64]; /*XXX*/ char dv_xname[64]; /*XXX*/
} sc_dev; } sc_dev;