diff options
| author | Guillem Jover <guillem@debian.org> | 2005-11-28 01:43:35 +0000 |
|---|---|---|
| committer | Guillem Jover <guillem@debian.org> | 2005-11-28 01:43:35 +0000 |
| commit | 50b6269c11693ba402d22ff4ac0651b65fc3e302 (patch) | |
| tree | 70a85c930cef1748a03d7d1715fbde96d2225fff /debian/patches/17_net_gcc_4.0.patch | |
| parent | 45687536a7af7d617fd319359578a7f8d934ae62 (diff) | |
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 <tschwinge@gnu.org>.
Diffstat (limited to 'debian/patches/17_net_gcc_4.0.patch')
| -rw-r--r-- | debian/patches/17_net_gcc_4.0.patch | 37 |
1 files changed, 37 insertions, 0 deletions
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 <tschwinge@gnu.org> + + * 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); ++ } + } + } + |
