summaryrefslogtreecommitdiff
path: root/misc/cksfv/patches
diff options
context:
space:
mode:
authorxtraeme <xtraeme@pkgsrc.org>2004-07-16 23:40:54 +0000
committerxtraeme <xtraeme@pkgsrc.org>2004-07-16 23:40:54 +0000
commit5ddd260d04a74b9623b1a63de83e42b888012693 (patch)
tree27daf79b76ca917cc1a9c74287e0d86044c6d478 /misc/cksfv/patches
parent8bc7d9954f25b568dc3d5c992687f33723a45318 (diff)
downloadpkgsrc-5ddd260d04a74b9623b1a63de83e42b888012693.tar.gz
Apply patch from PR pkg/26330 by Tobias Nygren to make this work on
Alpha.
Diffstat (limited to 'misc/cksfv/patches')
-rw-r--r--misc/cksfv/patches/patch-ag24
1 files changed, 24 insertions, 0 deletions
diff --git a/misc/cksfv/patches/patch-ag b/misc/cksfv/patches/patch-ag
new file mode 100644
index 00000000000..bd945bdabff
--- /dev/null
+++ b/misc/cksfv/patches/patch-ag
@@ -0,0 +1,24 @@
+$NetBSD: patch-ag,v 1.1 2004/07/16 23:40:54 xtraeme Exp $
+
+--- src/crc32.c.orig 2001-07-06 08:33:08.000000000 +0200
++++ src/crc32.c
+@@ -95,17 +95,16 @@ int crc32(register int fd, unsigned long
+ {
+ char buf[BUFFERSIZE], *p;
+ int len = 0, nr;
+- unsigned long crc = ~0, crc32_total = ~0;
++ unsigned long crc = 0xffffffff;
+
+ while ((nr = read(fd, buf, sizeof(buf))) > 0)
+ for (len += nr, p = buf; nr--; ++p) {
+ crc = (crc >> 8) ^ crctable[(crc ^ *p) & 0xff];
+- crc32_total = (crc >> 8) ^ crctable[(crc32_total ^ *p) & 0xff];
+ }
+ if (nr < 0)
+ return 1;
+
+ *main_len = len;
+- *main_val = ~crc;
++ *main_val = (~crc)&0xffffffff;
+ return 0;
+ }