summaryrefslogtreecommitdiff
path: root/graphics/sane-backends/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/sane-backends/patches/patch-ac')
-rw-r--r--graphics/sane-backends/patches/patch-ac49
1 files changed, 49 insertions, 0 deletions
diff --git a/graphics/sane-backends/patches/patch-ac b/graphics/sane-backends/patches/patch-ac
new file mode 100644
index 00000000000..3dbe8f35f87
--- /dev/null
+++ b/graphics/sane-backends/patches/patch-ac
@@ -0,0 +1,49 @@
+$NetBSD: patch-ac,v 1.3 2006/06/27 12:27:06 joerg Exp $
+
+--- sanei/sanei_ab306.c.orig 2006-06-20 01:54:43.000000000 -0700
++++ sanei/sanei_ab306.c
+@@ -78,7 +78,7 @@ inb (u_long port)
+ #include "sane/sanei.h"
+ #include "sane/sanei_ab306.h"
+
+-#if (defined(HAVE_IOPERM) || defined(__FreeBSD__)) && !defined(IO_SUPPORT_MISSING)
++#if (defined(HAVE_IOPERM) || defined(__FreeBSD__) || defined(__DragonFly__)) && !defined(IO_SUPPORT_MISSING)
+
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -99,7 +99,7 @@ inb (u_long port)
+ #define PORT_DEV "/dev/port"
+ #define AB306_CIO 0x379 /* control i/o port */
+
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ static int dev_io_fd = 0;
+ #endif
+
+@@ -287,7 +287,7 @@ sanei_ab306_open (const char *dev, int *
+
+ status = sanei_ab306_get_io_privilege (i);
+
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ status = sanei_ab306_get_io_privilege (i);
+ if (status != SANE_STATUS_GOOD)
+ return status;
+@@ -366,7 +366,7 @@ sanei_ab306_get_io_privilege (int fd)
+ {
+ if (port[fd].port_fd < 0)
+ {
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ if (dev_io_fd == 0)
+ dev_io_fd = open ("/dev/io", O_RDONLY);
+ if (dev_io_fd < 0)
+@@ -517,7 +517,7 @@ sanei_ab306_exit (void)
+ /* power off the scanner: */
+ ab306_outb (port + i, port[i].base + 1, 0x00);
+ }
+-#if defined(__FreeBSD)
++#if defined(__FreeBSD) || defined(__DragonFly__)
+ if (dev_io_fd >0)
+ close (dev_io_fd);
+ #endif /* defined(__FreeBSD__) */