summaryrefslogtreecommitdiff
path: root/util/inteltool/inteltool.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/inteltool/inteltool.c')
-rw-r--r--util/inteltool/inteltool.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c
index 9fcf58d043..974db6fb71 100644
--- a/util/inteltool/inteltool.c
+++ b/util/inteltool/inteltool.c
@@ -24,6 +24,10 @@
#include <unistd.h>
#include "inteltool.h"
+#ifdef __NetBSD__
+#include <machine/sysarch.h>
+#endif
+
/*
* http://pci-ids.ucw.cz/read/PC/8086
* http://en.wikipedia.org/wiki/Intel_Tick-Tock
@@ -344,6 +348,14 @@ int main(int argc, char *argv[])
#if defined(__FreeBSD__)
if (open("/dev/io", O_RDWR) < 0) {
perror("/dev/io");
+#elif defined(__NetBSD__)
+# ifdef __i386__
+ if (i386_iopl(3)) {
+ perror("iopl");
+# else
+ if (x86_64_iopl(3)) {
+ perror("iopl");
+# endif
#else
if (iopl(3)) {
perror("iopl");