811cc48964
Add upstream bug report URLs for some others. XXX: patch-a[bhijk] are not sent upstream since I don't understand the need.
52 lines
1.7 KiB
Text
52 lines
1.7 KiB
Text
$NetBSD: patch-ac,v 1.6 2015/10/27 11:29:35 wiz Exp $
|
|
|
|
DragonFly support.
|
|
https://alioth.debian.org/tracker/index.php?func=detail&aid=315205&group_id=30186&atid=410366
|
|
|
|
--- sanei/sanei_ab306.c.orig 2010-04-05 13:18:05.000000000 +0000
|
|
+++ sanei/sanei_ab306.c
|
|
@@ -78,7 +78,7 @@ inb (u_long port)
|
|
#include "../include/sane/sanei.h"
|
|
#include "../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__) */
|