From adda8aa04b5e98694121ca763d6a98fd75c44488 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Thu, 10 Feb 2022 15:42:36 +0000 Subject: [PATCH] ipsec: fix C++ include [ upstream commit e82470e22528ad7c0277aa94ecbc6b97f3bdb4c2 ] C++ does not have automatic casting to/from void pointers, so need explicit cast if header is to be included in C++ code Fixes: f901d9c82688 ("ipsec: add helpers to group completed crypto-ops") Signed-off-by: Bruce Richardson Acked-by: Konstantin Ananyev --- lib/librte_ipsec/rte_ipsec_group.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_ipsec/rte_ipsec_group.h b/lib/librte_ipsec/rte_ipsec_group.h index 47b33ca5ec..27a2f6f26d 100644 --- a/lib/librte_ipsec/rte_ipsec_group.h +++ b/lib/librte_ipsec/rte_ipsec_group.h @@ -51,10 +51,10 @@ rte_ipsec_ses_from_crypto(const struct rte_crypto_op *cop) if (cop->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) { ss = cop->sym[0].sec_session; - return (void *)(uintptr_t)ss->opaque_data; + return (struct rte_ipsec_session *)(uintptr_t)ss->opaque_data; } else if (cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION) { cs = cop->sym[0].session; - return (void *)(uintptr_t)cs->opaque_data; + return (struct rte_ipsec_session *)(uintptr_t)cs->opaque_data; } return NULL; }