[flashrom] [PATCH] Add support for libpci older than 2.2
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Sat Jul 17 16:47:54 CEST 2010
Add support for pciutils/libpci older than 2.2. Needed on the original
Xbox running Xebian and a few other ancient systems.
Alec, if this fixes compilation for you, can you please respond with
> Acked-by: Your Name <your at email>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Index: flashrom-libpci_before_2_2/board_enable.c
===================================================================
--- flashrom-libpci_before_2_2/board_enable.c (Revision 1085)
+++ flashrom-libpci_before_2_2/board_enable.c (Arbeitskopie)
@@ -785,7 +785,14 @@
return -1;
}
+#if PCI_LIB_VERSION >= 0x020200
dev = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, 1);
+#else
+ /* libpci before 2.2 */
+ msg_pinfo("Your pciutils/libpci version is too old to support "
+ "PCI domains. Continuing anyway.\n");
+ dev = pci_get_dev(pacc, dev->bus, dev->dev, 1);
+#endif
if (!dev) {
msg_perr("MCP SMBus controller could not be found\n");
return -1;
--
http://www.hailfinger.org/
More information about the flashrom
mailing list