$NetBSD: patch-ab,v 1.3 2001/01/07 04:05:03 thorpej Exp $

--- port.C.orig	Mon Oct 27 09:29:35 1997
+++ port.C	Sat Jan  6 19:52:36 2001
@@ -30,6 +30,10 @@
   #endif
 #elif defined(FREEBSD)
 #include <machine/cpufunc.h>
+#elif defined(NETBSD)
+#include <sys/types.h>
+#include <machine/sysarch.h>
+#include <machine/pio.h>	/* XXX */
 #elif defined(BSDI)
 #include <machine/inline.h>
 #elif defined(LYNX)
@@ -62,6 +66,20 @@
     perror("fopen /dev/io");
     return;
   }
+#elif defined(NETBSD)
+# if defined(__alpha__)
+  if (alpha_pci_io_enable(1) != 0) {
+    perror("alpha_pci_io_enable");
+    return;
+  }
+# elif defined(__i386__)
+  if (i386_iopl(3) != 0) {
+    perror("i386_iopl");
+    return;
+  }
+# else
+#  error Not supported on this CPU.
+# endif
 #elif defined(LYNX)
   if (io_access() < 0) {
     perror("io_access");
