From 14c593e0034ddb9ca68f4a8e06b251afa127c6d0 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 28 Nov 2022 11:01:12 +0000 Subject: [PATCH] Don't set cancel state/type pthread_cancel() is never called by OpenSSL. Therefore this is no point in setting the cancel state/type. The functions to set the cancel state/type are not supported on Android and result in compilation failures. Therefore we remove these calls completely. Fixes #19559 Reviewed-by: Hugo Landau Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/19779) --- crypto/thread/arch/thread_posix.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/crypto/thread/arch/thread_posix.c b/crypto/thread/arch/thread_posix.c index b737a5e7886..b18f997b94b 100644 --- a/crypto/thread/arch/thread_posix.c +++ b/crypto/thread/arch/thread_posix.c @@ -22,9 +22,6 @@ static void *thread_start_thunk(void *vthread) thread = (CRYPTO_THREAD *)vthread; - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - ret = thread->routine(thread->data); ossl_crypto_mutex_lock(thread->statelock); CRYPTO_THREAD_SET_STATE(thread, CRYPTO_THREAD_FINISHED); -- 2.47.3