From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 084EADE3 for ; Tue, 5 May 2015 14:47:37 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 05 May 2015 05:47:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,372,1427785200"; d="scan'208";a="566525111" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga003.jf.intel.com with ESMTP; 05 May 2015 05:47:34 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t45ClYNa014441; Tue, 5 May 2015 13:47:34 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t45ClYA5028826; Tue, 5 May 2015 13:47:34 +0100 Received: (from bricha3@localhost) by sivswdev01.ir.intel.com with id t45ClYp9028822; Tue, 5 May 2015 13:47:34 +0100 From: Bruce Richardson To: dev@dpdk.org Date: Tue, 5 May 2015 13:47:34 +0100 Message-Id: <1430830054-28791-1-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] eal/bsdapp: fix compilation on FreeBSD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2015 12:47:38 -0000 Fixes: 6065355a "pci: make device id tables const" Following the above commit, 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. 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 30f0232..61e8921 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.1.0