From 11f51a26d3e3a3cf78efa4c0a20d6aa5b29117c2 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 5 May 2015 13:47:34 +0100 Subject: [PATCH] eal/bsd: fix build on FreeBSD Compilation on FreeBSD with clang was broken, giving the error message: lib/librte_eal/bsdapp/eal/eal_pci.c:438:16: fatal error: assigning to 'struct rte_pci_id *' from 'const struct rte_pci_id *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) { ^ ~~~~~~~~~~~~ This patch fixes the issue by adding "const" to the type of id_table. Fixes: 6065355a03fc ("pci: make device id tables const") Signed-off-by: Bruce Richardson --- lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 30f0232f1d..61e89219b8 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -432,7 +432,7 @@ error: int rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *dev) { - struct rte_pci_id *id_table; + const struct rte_pci_id *id_table; int ret; for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) { -- 2.20.1