pciutils/pciutils-2.1.99-gcc4.patch
2005-03-14 17:36:54 +00:00

18 lines
923 B
Diff

Patch by Robert Scheck <redhat@linuxnetz.de> for pciutils >= 2.1.99, which make pciutils
rebuildable using gcc 4.
--- pciutils-2.1.99-test8/lib/i386-ports.c 2004-08-13 22:13:11.000000000 +0200
+++ pciutils-2.1.99-test8/lib/i386-ports.c.gcc4 2005-03-14 09:30:06.000000000 +0100
@@ -57,9 +57,9 @@
for(d.dev = 0; d.dev < 32; d.dev++)
{
u16 class, vendor;
- if (m->read(&d, PCI_CLASS_DEVICE, (byte *) &class, sizeof(class)) &&
+ if ((m->read) (&d, PCI_CLASS_DEVICE, (byte *) &class, sizeof(class)) &&
(class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST) || class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)) ||
- m->read(&d, PCI_VENDOR_ID, (byte *) &vendor, sizeof(vendor)) &&
+ (m->read) (&d, PCI_VENDOR_ID, (byte *) &vendor, sizeof(vendor)) &&
(vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL) || vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))
{
a->debug("...outside the Asylum at 0/%02x/0", d.dev);