From: Matt Caswell Date: Mon, 28 Nov 2022 11:01:12 +0000 (+0000) Subject: Don't set cancel state/type X-Git-Tag: openssl-3.2.0-alpha1~1639 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14c593e0034ddb9ca68f4a8e06b251afa127c6d0;p=thirdparty%2Fopenssl.git 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) --- 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);