summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-07-23 06:31:45 +0000
committerpeter <peter@FreeBSD.org>2002-07-23 06:31:45 +0000
commitcb331c3fc50439a6bde4c99d809f952c8cbf76de (patch)
tree0363ea3d3ab8f0863e7c70731d7f34068c604f52
parent7ff3e005dc93b849f0be34012396b3aabe1410e5 (diff)
downloadFreeBSD-src-cb331c3fc50439a6bde4c99d809f952c8cbf76de.zip
FreeBSD-src-cb331c3fc50439a6bde4c99d809f952c8cbf76de.tar.gz
Minimal tweak to not depend on NPCI, but still maintain portability
to 4.x which still does need it (since pci_if.h isn't generated without pci being present)
-rw-r--r--sys/dev/aic7xxx/aic79xx_osm.h9
-rw-r--r--sys/dev/aic7xxx/aic7xxx_osm.h9
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/dev/aic7xxx/aic79xx_osm.h b/sys/dev/aic7xxx/aic79xx_osm.h
index 83c1706..cc4edad 100644
--- a/sys/dev/aic7xxx/aic79xx_osm.h
+++ b/sys/dev/aic7xxx/aic79xx_osm.h
@@ -38,9 +38,6 @@
#define _AIC79XX_FREEBSD_H_
#include <opt_aic79xx.h> /* for config options */
-#ifndef NPCI
-#include <pci.h>
-#endif
#include <sys/param.h>
#include <sys/systm.h>
@@ -50,6 +47,12 @@
#include <sys/malloc.h>
#include <sys/queue.h>
+#if __FreeBSD_version < 500000
+#include <pci.h>
+#else
+#define NPCI 1
+#endif
+
#define AHD_PCI_CONFIG 1
#include <machine/bus_memio.h>
#include <machine/bus_pio.h>
diff --git a/sys/dev/aic7xxx/aic7xxx_osm.h b/sys/dev/aic7xxx/aic7xxx_osm.h
index 86361ab..c81a1b2 100644
--- a/sys/dev/aic7xxx/aic7xxx_osm.h
+++ b/sys/dev/aic7xxx/aic7xxx_osm.h
@@ -38,9 +38,6 @@
#define _AIC7XXX_FREEBSD_H_
#include <opt_aic7xxx.h> /* for config options */
-#ifndef NPCI
-#include <pci.h>
-#endif
#include <sys/param.h>
#include <sys/systm.h>
@@ -51,6 +48,12 @@
#include <sys/malloc.h>
#include <sys/queue.h>
+#if __FreeBSD_version < 500000
+#include <pci.h>
+#else
+#define NPCI 1
+#endif
+
#if NPCI > 0
#define AHC_PCI_CONFIG 1
#ifdef AHC_ALLOW_MEMIO
OpenPOWER on IntegriCloud