From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id 22123C644 for ; Thu, 30 Jul 2015 15:42:59 +0200 (CEST) Received: by wibud3 with SMTP id ud3so69051887wib.0 for ; Thu, 30 Jul 2015 06:42:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EwhxsxWaheZyWrHfrtaIyFuWyJB5XGVMwtusdie3xLM=; b=FQ+bEBrYn2XCBsvVH14X8TKJl2AQKschQvvHdY1Bo2pXR598i9Q1IgzuF0DASetdiL 5Wck32YiyePPg7su65EJjdboFSiJf3+yFcsieijPaCELRY5c3vzBs2T8YucD3JB2SgaZ cn3BVd6ydnm/KXN7Y3EjmpCgS8BX1GSrEIvhAuezGfg/Nne/Zc27F8fX8Z8ovD5BvFGq GoKL/6kEpkuDBzQp67JNkALMo73N2VIDhOBfNu5fhJLZWOQ0yYpu8H4tTmTWGOym8uRk 1LJ6zBEsYdIVeRm7EZ9VvI252OTcobTivlk4jec126XmU+h11YNFCG5q8H7GCsDEQidh xlIA== X-Gm-Message-State: ALoCoQlNx/Oh/2c0Yrtfh909jxdtcPyHTUVlJ7lpkf/lqFXGO7Jz1riKrgTeBj3dABmU4/+3i+nI X-Received: by 10.180.8.68 with SMTP id p4mr6697447wia.27.1438263778567; Thu, 30 Jul 2015 06:42:58 -0700 (PDT) Received: from XPS13.dev.6wind.com (6wind.net2.nerim.net. [213.41.151.210]) by smtp.gmail.com with ESMTPSA id eu2sm3133669wic.8.2015.07.30.06.42.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Jul 2015 06:42:57 -0700 (PDT) From: Thomas Monjalon To: Stephen Hemminger Date: Thu, 30 Jul 2015 15:41:33 +0200 Message-Id: <1438263693-24165-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.4.2 Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH] pci: fix build 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: Thu, 30 Jul 2015 13:42:59 -0000 Build log: lib/librte_eal/bsdapp/eal/eal_pci.c:462:9: error: incompatible integer to pointer conversion passing 'u_int32_t' (aka 'unsigned int') to parameter of type 'void *' It is fixed by passing the pointer of pi.pi_data to memcpy. By the way, it seems strange that pi_data is initialized twice: .pi_data = *(u_int32_t *)buf memcpy(&pi.pi_data, buf, len); Signed-off-by: Thomas Monjalon --- 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 ff56cd3..6fa0d08 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -459,7 +459,7 @@ int rte_eal_pci_write_config(const struct rte_pci_device *dev, goto error; } - memcpy(pi.pi_data, buf, len); + memcpy(&pi.pi_data, buf, len); fd = open("/dev/pci", O_RDONLY); if (fd < 0) { -- 2.4.2