From: Timothy Redaelli Date: Wed, 5 Feb 2020 17:05:45 +0000 (+0100) Subject: examples/eventdev: fix build with gcc 10 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=78de15bb586ac3d8938512db1977d83815c494f8 examples/eventdev: fix build with gcc 10 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: 3d1b33e44ae2 ("examples/eventdev: move common data into pipeline common") Cc: stable@dpdk.org Signed-off-by: Timothy Redaelli Acked-by: David Marchand --- diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c index d3ff1bbe4f..d0da51b1c9 100644 --- a/examples/eventdev_pipeline/main.c +++ b/examples/eventdev_pipeline/main.c @@ -10,6 +10,8 @@ #include "pipeline_common.h" +struct fastpath_data *fdata; + struct config_data cdata = { .num_packets = (1L << 25), /* do ~32M packets */ .num_fids = 512, diff --git a/examples/eventdev_pipeline/pipeline_common.h b/examples/eventdev_pipeline/pipeline_common.h index 8e30393d09..c7245f7f0f 100644 --- a/examples/eventdev_pipeline/pipeline_common.h +++ b/examples/eventdev_pipeline/pipeline_common.h @@ -93,8 +93,8 @@ struct port_link { uint8_t priority; }; -struct fastpath_data *fdata; -struct config_data cdata; +extern struct fastpath_data *fdata; +extern struct config_data cdata; static __rte_always_inline void exchange_mac(struct rte_mbuf *m)