aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/sane-backends
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2003-08-12 13:53:34 +0800
committersimokawa <simokawa@FreeBSD.org>2003-08-12 13:53:34 +0800
commit56131c45d073ca3483423872776a7875b624d185 (patch)
treedf79554d86d051d401f464b5a5fefbf680f1f2fa /graphics/sane-backends
parent84070b86469621bb771da076cc23197ce1816399 (diff)
downloadfreebsd-ports-gnome-56131c45d073ca3483423872776a7875b624d185.tar.gz
freebsd-ports-gnome-56131c45d073ca3483423872776a7875b624d185.tar.zst
freebsd-ports-gnome-56131c45d073ca3483423872776a7875b624d185.zip
Add a patch to fix a memory alignment problem for FireWire.
Diffstat (limited to 'graphics/sane-backends')
-rw-r--r--graphics/sane-backends/Makefile2
-rw-r--r--graphics/sane-backends/files/patch-backend_epson_scsi.c23
2 files changed, 24 insertions, 1 deletions
diff --git a/graphics/sane-backends/Makefile b/graphics/sane-backends/Makefile
index ed2f71a5d0b5..fba8f6af90e8 100644
--- a/graphics/sane-backends/Makefile
+++ b/graphics/sane-backends/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sane-backends
PORTVERSION= 1.0.12
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= ftp://ftp.mostang.com/pub/sane/%SUBDIR%/ \
ftp://ftp.de.mostang.com/pub/sane/%SUBDIR%/ \
diff --git a/graphics/sane-backends/files/patch-backend_epson_scsi.c b/graphics/sane-backends/files/patch-backend_epson_scsi.c
new file mode 100644
index 000000000000..0c8c7ae39c5c
--- /dev/null
+++ b/graphics/sane-backends/files/patch-backend_epson_scsi.c
@@ -0,0 +1,23 @@
+--- backend/epson_scsi.c.orig Sun Apr 27 21:57:39 2003
++++ backend/epson_scsi.c Tue Aug 12 14:26:20 2003
+@@ -93,15 +93,16 @@
+ {
+ u_char * cmd;
+
+- cmd = alloca( 6 + buf_size);
+- memset( cmd, 0, 6);
++#define ALIGN 8
++ cmd = alloca( ALIGN + buf_size);
++ memset( cmd, 0, ALIGN);
+ cmd[ 0] = WRITE_6_COMMAND;
+ cmd[ 2] = buf_size >> 16;
+ cmd[ 3] = buf_size >> 8;
+ cmd[ 4] = buf_size;
+- memcpy( cmd + 6, buf, buf_size);
++ memcpy( cmd + ALIGN, buf, buf_size);
+
+- if( SANE_STATUS_GOOD == ( *status = sanei_scsi_cmd( fd, cmd, 6 + buf_size, NULL, NULL)))
++ if( SANE_STATUS_GOOD == ( *status = sanei_scsi_cmd2( fd, cmd, 6, cmd + ALIGN, buf_size, NULL, NULL)))
+ return buf_size;
+
+ return 0;