From 50b6269c11693ba402d22ff4ac0651b65fc3e302 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 28 Nov 2005 01:43:35 +0000 Subject: Fix invalid lvalue errors with gcc-4.0 in ne2k-pci driver. - debian/patches/11_nic_update.patch: Split into ... - debian/pacthes/17_net_gcc_4.0.patch: ... here. Thanks to Thomas Schwinge . --- debian/patches/17_net_gcc_4.0.patch | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 debian/patches/17_net_gcc_4.0.patch (limited to 'debian/patches/17_net_gcc_4.0.patch') diff --git a/debian/patches/17_net_gcc_4.0.patch b/debian/patches/17_net_gcc_4.0.patch new file mode 100644 index 0000000..9534738 --- /dev/null +++ b/debian/patches/17_net_gcc_4.0.patch @@ -0,0 +1,37 @@ +#DPATCHLEVEL=0 + +2005-11-05 Thomas Schwinge + + * linux/src/drivers/net/ne2k-pci.c (ne2k_pci_block_input) + (ne2k_pci_block_output): Fix invalid lvalue errors with gcc 4.0. + + +diff -Naur linux/src/drivers/net/ne2k-pci.c linux/src/drivers/net/ne2k-pci.c +--- linux/src/drivers/net/ne2k-pci.c 2005-11-28 03:34:08.000000000 +0200 ++++ linux/src/drivers/net/ne2k-pci.c 2005-11-28 03:38:41.000000000 +0200 +@@ -546,8 +546,10 @@ + insl(NE_BASE + NE_DATAPORT, buf, count>>2); + if (count & 3) { + buf += count & ~3; +- if (count & 2) +- *((u16*)buf)++ = le16_to_cpu(inw(NE_BASE + NE_DATAPORT)); ++ if (count & 2) { ++ *((u16 *) buf) = le16_to_cpu(inw(NE_BASE + NE_DATAPORT)); ++ buf = (void *) buf + sizeof (u16); ++ } + if (count & 1) + *buf = inb(NE_BASE + NE_DATAPORT); + } +@@ -609,8 +611,10 @@ + outsl(NE_BASE + NE_DATAPORT, buf, count>>2); + if (count & 3) { + buf += count & ~3; +- if (count & 2) +- outw(cpu_to_le16(*((u16*)buf)++), NE_BASE + NE_DATAPORT); ++ if (count & 2) { ++ outw(cpu_to_le16(*((u16 *) buf)), NE_BASE + NE_DATAPORT); ++ buf = (void *) buf + sizeof (u16); ++ } + } + } + -- cgit v1.2.3