diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common_init.c | 2 | ||||
-rw-r--r-- | src/freebsd_pci.c | 12 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/common_init.c b/src/common_init.c index ff24183..0b799ff 100644 --- a/src/common_init.c +++ b/src/common_init.c @@ -54,7 +54,7 @@ pci_system_init( void ) #ifdef linux err = pci_system_linux_sysfs_create(); -#elif defined(__FreeBSD__) || defined(__DragonFly__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) err = pci_system_freebsd_create(); #elif defined(__OpenBSD__) err = pci_system_openbsd_create(); diff --git a/src/freebsd_pci.c b/src/freebsd_pci.c index 4b8f7ba..352cac7 100644 --- a/src/freebsd_pci.c +++ b/src/freebsd_pci.c @@ -43,12 +43,6 @@ #include <sys/mman.h> #include <sys/memrange.h> -#if __FreeBSD_version >= 700053 -#define DOMAIN_SUPPORT 1 -#else -#define DOMAIN_SUPPORT 0 -#endif - #include "pciaccess.h" #include "pciaccess_private.h" @@ -168,7 +162,7 @@ pci_device_freebsd_read( struct pci_device * dev, void * data, { struct pci_io io; -#if DOMAIN_SUPPORT +#if HAVE_PCI_IO_PC_DOMAIN io.pi_sel.pc_domain = dev->domain; #endif io.pi_sel.pc_bus = dev->bus; @@ -208,7 +202,7 @@ pci_device_freebsd_write( struct pci_device * dev, const void * data, { struct pci_io io; -#if DOMAIN_SUPPORT +#if HAVE_PCI_IO_PC_DOMAIN io.pi_sel.pc_domain = dev->domain; #endif io.pi_sel.pc_bus = dev->bus; @@ -488,7 +482,7 @@ pci_system_freebsd_create( void ) for ( i = 0; i < pciconfio.num_matches; i++ ) { struct pci_conf *p = &pciconf[ i ]; -#if DOMAIN_SUPPORT +#if HAVE_PCI_IO_PC_DOMAIN pci_sys->devices[ i ].base.domain = p->pc_sel.pc_domain; #else pci_sys->devices[ i ].base.domain = 0; |