diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2006-11-06 13:42:10 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2006-11-06 13:42:10 +0000 |
| commit | acd3428b7d3e94cef0e1881c868cb4b131d4ff41 (patch) | |
| tree | b9dd284620eeaddbff089cef10e4b1afb7918279 /sys/dev/lmc | |
| parent | 800c94083290dc4b38138b28cfc03ee77de4ff79 (diff) | |
Notes
Diffstat (limited to 'sys/dev/lmc')
| -rw-r--r-- | sys/dev/lmc/if_lmc.c | 3 | ||||
| -rw-r--r-- | sys/dev/lmc/if_lmc.h | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c index 35ce7a92ce3c..f970d3175b81 100644 --- a/sys/dev/lmc/if_lmc.c +++ b/sys/dev/lmc/if_lmc.c @@ -113,6 +113,9 @@ # include <sys/rman.h> # include <vm/vm.h> # include <vm/pmap.h> +# if (__FreeBSD_version >= 700000) +# include <sys/priv.h> +# endif # if (__FreeBSD_version >= 500000) # include <sys/mutex.h> # include <dev/pci/pcivar.h> diff --git a/sys/dev/lmc/if_lmc.h b/sys/dev/lmc/if_lmc.h index 85dfc55bf2d3..140750d86b1c 100644 --- a/sys/dev/lmc/if_lmc.h +++ b/sys/dev/lmc/if_lmc.h @@ -1223,7 +1223,11 @@ struct softc # define TOP_UNLOCK mtx_unlock (&sc->top_mtx) # define BOTTOM_TRYLOCK mtx_trylock(&sc->bottom_mtx) # define BOTTOM_UNLOCK mtx_unlock (&sc->bottom_mtx) -# define CHECK_CAP suser(curthread) +# if (__FreeBSD_version >= 700000) +# define CHECK_CAP priv_check(curthread, PRIV_DRIVER) +# else +# define CHECK_CAP suser(curthread) +# endif # else /* FreeBSD-4 */ # define TOP_TRYLOCK (sc->top_spl = splimp()) # define TOP_UNLOCK splx(sc->top_spl) |
