From f1dfa44726072f76ed5202140e3c76a212ed7625 Mon Sep 17 00:00:00 2001 From: stefanct Date: Sun, 8 Feb 2015 21:58:04 +0000 Subject: 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). Signed-off-by: Stefan Tauner Acked-by: Stefan Tauner git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1880 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- board_enable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board_enable.c') 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 -- cgit v1.2.1