> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Thursday, September 5, 2019 3:53 PM
> To: Dumitrescu, Cristian <[email protected]>
> Cc: [email protected]; [email protected]
> Subject: [PATCH 09/10] app/test-pipeline: fix global variable multiple
> definitions
> 
> 'app' global variable is defined in multiple .c files, fixed it by
> marking one copy as 'extern'
> 
> Issue has been detected by '-fno-common' gcc flag.
> 
> Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark")
> Cc: [email protected]
> 
> Signed-off-by: Ferruh Yigit <[email protected]>
> ---
>  app/test-pipeline/config.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test-pipeline/config.c b/app/test-pipeline/config.c
> index 28ac9fcc0..42c6ed9b2 100644
> --- a/app/test-pipeline/config.c
> +++ b/app/test-pipeline/config.c
> @@ -42,7 +42,7 @@
> 
>  #include "main.h"
> 
> -struct app_params app;
> +extern struct app_params app;
> 
>  static const char usage[] = "\n";
> 
> --
> 2.21.0

The global variable "app" is already declared as extern in the main.h file, 
which is included into config.c file, so please remove this "app" definition in 
config.c altogether.

Thanks,
Cristian

Reply via email to