[dpdk-dev] [PATCH] crypto/kasumi: fix gcc 10 fno-common error

Kevin Traynor ktraynor at redhat.com
Tue May 5 14:54:42 CEST 2020


gcc 10 defaults to fno-common and it reports:

crypto_kasumi_rte_kasumi_pmd_ops.c.o:(.data.rel+0x0):
multiple definition of `rte_kasumi_pmd_ops';
crypto_kasumi_rte_kasumi_pmd.c.o:(.bss+0x8): first defined here

Fix by making rte_kasumi_pmd_ops extern in the header file.

Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
---
 drivers/crypto/kasumi/kasumi_pmd_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/kasumi/kasumi_pmd_private.h b/drivers/crypto/kasumi/kasumi_pmd_private.h
index b7f1c428b..abedcd616 100644
--- a/drivers/crypto/kasumi/kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/kasumi_pmd_private.h
@@ -77,5 +77,5 @@ kasumi_set_session_parameters(MB_MGR *mgr, struct kasumi_session *sess,
 
 /** device specific operations function pointer structure */
-struct rte_cryptodev_ops *rte_kasumi_pmd_ops;
+extern struct rte_cryptodev_ops *rte_kasumi_pmd_ops;
 
 #endif /* _KASUMI_PMD_PRIVATE_H_ */
-- 
2.21.3



More information about the dev mailing list