Bug#300702: vdr: EPG data for amd64

Oliver Cordes pkg-vdr-dvb-devel@lists.alioth.debian.org
Mon, 21 Mar 2005 09:56:13 +0100


This is a multi-part MIME message sent by reportbug.

--===============4970680208302112102==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: vdr
Severity: important
Tags: patch

vdr in a debian amd64 system is not able to accept EPG data due to an
error in the crc subroutine. The original routine uses an system u_long
variable which is 64bit under amd64, but the crc routine is written for
a 32bit use.  Please apply the following patch, it's not harmful to
patch also the 32bit version.


-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.11
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

--===============4970680208302112102==
Content-Type: text/x-c++; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="vdr.patch"

Common subdirectories: vdr-1.2.6.vanilla/libdtv/libsi/include and vdr-1.2.6/libdtv/libsi/include
diff -u vdr-1.2.6.vanilla/libdtv/libsi/si_parser.c vdr-1.2.6/libdtv/libsi/si_parser.c
--- vdr-1.2.6.vanilla/libdtv/libsi/si_parser.c	2003-08-15 15:56:02.000000000 +0200
+++ vdr-1.2.6/libdtv/libsi/si_parser.c	2005-03-21 09:50:25.457874928 +0100
@@ -1278,7 +1278,7 @@
 
 // CRC32 lookup table for polynomial 0x04c11db7
 
-static u_long crc_table[256] = {
+static __u32 crc_table[256] = {
 	0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
 	0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
 	0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7,
@@ -1326,7 +1326,7 @@
 static u_long crc32 (char *data, int len)
 {
 	register int i;
-	u_long crc = 0xffffffff;
+	__u32 crc = 0xffffffff;
 
 	for (i=0; i<len; i++)
 		crc = (crc << 8) ^ crc_table[((crc >> 24) ^ *data++) & 0xff];

--===============4970680208302112102==--