diff options
author | Thomas Klausner <wiz@NetBSD.org> | 2013-06-29 20:49:53 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-07-06 09:46:03 -0700 |
commit | 9a13ecb8f1462efaf741fed293e29ba38757ff70 (patch) | |
tree | 9a198ddb7fd386683ccdcd28ad609b04bc0a01a6 /src | |
parent | 1d364cb2f5b5cb1b18601735f42bada7a521be19 (diff) |
Fix build on NetBSD-4.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/netbsd_pci.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/netbsd_pci.c b/src/netbsd_pci.c index c9bd052..295e927 100644 --- a/src/netbsd_pci.c +++ b/src/netbsd_pci.c @@ -21,10 +21,25 @@ #include <sys/mman.h> #include <sys/types.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef HAVE_MTRR #include <machine/sysarch.h> #include <machine/mtrr.h> +#ifdef _X86_SYSARCH_L +/* NetBSD 5.x and newer */ #define netbsd_set_mtrr(mr, num) _X86_SYSARCH_L(set_mtrr)(mr, num) +#else +/* NetBSD 4.x and older */ +#ifdef __i386__ +#define netbsd_set_mtrr(mr, num) i386_set_mtrr((mr), (num)) +#endif +#ifdef __amd64__ +#define netbsd_set_mtrr(mr, num) x86_64_set_mtrr((mr), (num)) +#endif +#endif #endif #include <dev/pci/pcidevs.h> |