net/virtio: fix build
authorJerin Jacob <jerinj@marvell.com>
Tue, 30 Jul 2019 11:04:06 +0000 (16:34 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 30 Jul 2019 17:46:11 +0000 (19:46 +0200)
commit198cce71104370de0be3085d3772b502e2aa4984
tree73dbb729d1a9e0590b52326b8d64950b5eb93f2f
parent54dcfdee85aa773358c80ec3f64631b2cb732a33
net/virtio: fix build

Add extern to variable declaration to avoid some compiler treating it
as variable definition.

build error log:

lib/librte_pmd_virtio.a(vhost_kernel.o):(.rodata+0x110):
multiple definition of `vhost_msg_strings'
lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
first defined here
lib/librte_pmd_virtio.a(virtio_user_dev.o):(.rodata+0xe8):
multiple definition of `vhost_msg_strings'
lib/librte_pmd_virtio.a(vhost_user.o):(.data.rel.ro.local+0x0):
first defined here

Fixes: 33d24d65fe2b ("net/virtio-user: abstract backend operations")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_user/vhost.h