examples/vm_power: fix build with -fno-common
The variables of the same name are merged together if compiled with -fcommon. It used to be the default. This default behaviour allows to declare a variable in a header file and share the variable in every .o binaries thanks to merge at link-time. If compiling with -fno-common (default in GCC 10), the variable must be shared as extern to avoid multiple re-definitions. Fixes: dff22404aaad ("examples/vm_power_mgr: add VCPU to PCPU mapping") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com> Acked-by: Kevin Traynor <ktraynor@redhat.com>
This commit is contained in:
parent
7f55a2053b
commit
96d3d532f9
@ -35,6 +35,8 @@
|
||||
|
||||
#define RTE_LOGTYPE_CHANNEL_MANAGER RTE_LOGTYPE_USER1
|
||||
|
||||
struct libvirt_vm_info lvm_info[MAX_CLIENTS];
|
||||
|
||||
/* Global pointer to libvirt connection */
|
||||
static virConnectPtr global_vir_conn_ptr;
|
||||
|
||||
|
@ -41,7 +41,7 @@ struct libvirt_vm_info {
|
||||
uint8_t num_cpus;
|
||||
};
|
||||
|
||||
struct libvirt_vm_info lvm_info[MAX_CLIENTS];
|
||||
extern struct libvirt_vm_info lvm_info[MAX_CLIENTS];
|
||||
/* Communication Channel Status */
|
||||
enum channel_status { CHANNEL_MGR_CHANNEL_DISCONNECTED = 0,
|
||||
CHANNEL_MGR_CHANNEL_CONNECTED,
|
||||
|
Loading…
x
Reference in New Issue
Block a user