summaryrefslogtreecommitdiffstats
path: root/board_enable.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2015-02-08 21:58:04 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2015-02-08 21:58:04 +0000
commit03d4faca7aed125d48c69dd50119e0ec0bfd5978 (patch)
treec983ef2d2c6f99c099cd4bad2bb517b44389aeb4 /board_enable.c
parent2e0a0d55399da5fc1449459646e156f288498e29 (diff)
downloadflashrom-03d4faca7aed125d48c69dd50119e0ec0bfd5978.zip
flashrom-03d4faca7aed125d48c69dd50119e0ec0bfd5978.tar.gz
Refine version check of libpci function pci_get_dev
The way more elegant check for the header fails unfortunately on CentOS 4.9 because PCI_LIB_VERSION is not defined at all although the domain parameter is present. This patch jumps through the hoops via an additional check in the Makefile to determine if the function accepts 5 parameters (new version) or not (old version). Corresponding to flashrom svn r1880. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'board_enable.c')
-rw-r--r--board_enable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board_enable.c b/board_enable.c
index 66c587e..81dcfec 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -1047,7 +1047,7 @@ static int nvidia_mcp_gpio_set(int gpio, int raise)
return -1;
}
-#if PCI_LIB_VERSION >= 0x020200
+#if !defined(OLD_PCI_GET_DEV)
dev = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, 1);
#else
/* pciutils/libpci before version 2.2 is too old to support
OpenPOWER on IntegriCloud