OpenSSL 1.1.0 uses new threading API. It is no longer necessary to set
locking callbacks to use OpenSSL in a multi-threaded environment.
OpenSSL provides compatibility callbacks, but ODP compilation still
fails with unused function/argument errors. So, to support compiling ODP
with OpenSSL 1.1.x, add ODP_UNUSED annotiations to lock/thread_id
callbacks.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@linaro.org>
---
 platform/linux-generic/odp_crypto.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/platform/linux-generic/odp_crypto.c 
b/platform/linux-generic/odp_crypto.c
index adadbf97..54b222fd 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -949,14 +949,14 @@ odp_crypto_operation(odp_crypto_op_param_t *param,
        return 0;
 }
 
-static void openssl_thread_id(CRYPTO_THREADID *id)
+static void ODP_UNUSED openssl_thread_id(CRYPTO_THREADID ODP_UNUSED *id)
 {
        CRYPTO_THREADID_set_numeric(id, odp_thread_id());
 }
 
-static void openssl_lock(int mode, int n,
-                        const char *file ODP_UNUSED,
-                        int line ODP_UNUSED)
+static void ODP_UNUSED openssl_lock(int mode, int n,
+                                   const char *file ODP_UNUSED,
+                                   int line ODP_UNUSED)
 {
        if (mode & CRYPTO_LOCK)
                odp_ticketlock_lock((odp_ticketlock_t *)
-- 
2.11.0

Reply via email to