From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C0740A04FA; Wed, 5 Feb 2020 14:47:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96DB11C1F5; Wed, 5 Feb 2020 14:47:21 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id BAFB11C1D4 for ; Wed, 5 Feb 2020 14:47:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580910439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w729bHruMM2rDKhrzY/8PDkJ/ZQgMNBWfdBk6gL56sM=; b=EZEKTnZ6DsS8pQ/qot3L4aYGtbgknwaqU6qy5XiYv2l9tVnbGmi0WFd8hub/WNc1DPU/BM zxxBmZmtarsFpa2g03+KRqbjR6DwDcoRIhtAfD4MaiAXXDsYfAdxkpYjgpe50mJ5713yCf jrechHtxmEl5XvzTfzl7+Ny4q/Yrd0k= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-41-i8BrFtaoNSyP7aXeTWyZ1w-1; Wed, 05 Feb 2020 08:47:15 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 191D08B5E4F; Wed, 5 Feb 2020 13:47:14 +0000 (UTC) Received: from aldebaran.drizzt.lan (dhcp19-189-71.ntdv.lab.eng.bos.redhat.com [10.19.189.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8AD5857B7; Wed, 5 Feb 2020 13:47:12 +0000 (UTC) From: Timothy Redaelli To: dev@dpdk.org Cc: stable@dpdk.org, jin.yu@intel.com Date: Wed, 5 Feb 2020 14:47:03 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: i8BrFtaoNSyP7aXeTWyZ1w-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] [PATCH 1/3] examples/vhost_blk: fix building with GCC 10 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" GCC 10 defaults to -fno-common, this means a linker error will now be reported if the same global variable is defined in more than one compilation unit. Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Cc: jin.yu@intel.com Cc: stable@dpdk.org Signed-off-by: Timothy Redaelli --- examples/vhost_blk/vhost_blk.c | 2 ++ examples/vhost_blk/vhost_blk.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.= c index e1036bf3a..143ae19f3 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b/examples/vhost_blk/vhost_blk.c @@ -31,6 +31,8 @@ =09=09=09 (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \ =09=09=09 (1ULL << VHOST_USER_F_PROTOCOL_FEATURES)) =20 +struct vhost_blk_ctrlr *g_vhost_ctrlr; + /* Path to folder where character device will be created. Can be set by us= er. */ static char dev_pathname[PATH_MAX] =3D ""; static sem_t exit_sem; diff --git a/examples/vhost_blk/vhost_blk.h b/examples/vhost_blk/vhost_blk.= h index 933e2b7c5..17258d284 100644 --- a/examples/vhost_blk/vhost_blk.h +++ b/examples/vhost_blk/vhost_blk.h @@ -112,8 +112,8 @@ struct inflight_blk_task { =09struct rte_vhost_inflight_info_packed *inflight_packed; }; =20 -struct vhost_blk_ctrlr *g_vhost_ctrlr; -struct vhost_device_ops vhost_blk_device_ops; +extern struct vhost_blk_ctrlr *g_vhost_ctrlr; +extern struct vhost_device_ops vhost_blk_device_ops; =20 int vhost_bdev_process_blk_commands(struct vhost_block_dev *bdev, =09=09=09=09 struct vhost_blk_task *task); --=20 2.24.1