C++ does not have automatic casting to/from void pointers, so need
explicit cast if header is to be included in C++ code

Signed-off-by: Bruce Richardson <bruce.richard...@intel.com>
---
 lib/ipsec/rte_ipsec_group.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ipsec/rte_ipsec_group.h b/lib/ipsec/rte_ipsec_group.h
index 60ab297710..62c2bd7217 100644
--- a/lib/ipsec/rte_ipsec_group.h
+++ b/lib/ipsec/rte_ipsec_group.h
@@ -49,10 +49,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;
 }
--
2.32.0

Reply via email to