Commit 4d3d7a185b for strongswan.org

commit 4d3d7a185ba6331043d9e1aaeb199f3585498df0
Author: Tobias Brunner <tobias@strongswan.org>
Date:   Mon Oct 12 20:24:39 2026 +0200

    thread-value: Print a warning if pthread_key_create() fails

    Should not happen normally, but helps debugging issues like the one
    caused by the OpenSSL version mismatch in the previous commit.

diff --git a/src/libstrongswan/threading/thread_value.c b/src/libstrongswan/threading/thread_value.c
index 96ecf63559..04f2affe9b 100644
--- a/src/libstrongswan/threading/thread_value.c
+++ b/src/libstrongswan/threading/thread_value.c
@@ -78,6 +78,7 @@ METHOD(thread_value_t, destroy, void,
 thread_value_t *thread_value_create(thread_cleanup_t destructor)
 {
 	private_thread_value_t *this;
+	int err;

 	INIT(this,
 		.public = {
@@ -88,7 +89,11 @@ thread_value_t *thread_value_create(thread_cleanup_t destructor)
 		.destructor = destructor,
 	);

-	pthread_key_create(&this->key, destructor);
+	err = pthread_key_create(&this->key, destructor);
+	if (err)
+	{
+		DBG1(DBG_LIB, "!!! PTHREAD KEY CREATE ERROR: %s !!!", strerror(err));
+	}
 	return &this->public;
 }