diff mbox series

[v3,3/3] linux-generic: crypto: support OpenSSL 1.1.0

Message ID 20170223133734.19436-3-dmitry.ereminsolenikov@linaro.org
State Accepted
Commit 484f37b71aac5f5a56cd12c72c348d90d1095e31
Headers show
Series [v3,1/3] linux-generic: crypto: add missing include | expand

Commit Message

Dmitry Eremin-Solenikov Feb. 23, 2017, 1:37 p.m. UTC
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.ereminsolenikov@linaro.org>

---
 platform/linux-generic/odp_crypto.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.11.0
diff mbox series

Patch

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 *)