From 5981ed1834912fd849ae62db710f51db7cfbe910 Mon Sep 17 00:00:00 2001 From: Maxim Menshikov Date: Wed, 16 Sep 2026 13:11:12 +0100 Subject: [PATCH] [libs] Include pthread.h where pthread_once is used pal_hmac.c uses pthread_once_t and PTHREAD_ONCE_INIT but includes neither pthread.h nor anything that is guaranteed to pull it in - it relied on the OpenSSL headers doing so. OpenSSL 3.5 no longer does, and the file stops compiling: error: use of undeclared identifier 'PTHREAD_ONCE_INIT' error: call to undeclared function 'pthread_once' Include it directly, as pal_evp.c, opensslshim.c and pal_bio.c in the same library already do. Signed-off-by: Maxim Menshikov --- src/native/libs/System.Security.Cryptography.Native/pal_hmac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_hmac.c b/src/native/libs/System.Security.Cryptography.Native/pal_hmac.c index cb9ae46c0f0c11..6a7c54fba78797 100644 --- a/src/native/libs/System.Security.Cryptography.Native/pal_hmac.c +++ b/src/native/libs/System.Security.Cryptography.Native/pal_hmac.c @@ -6,6 +6,7 @@ #include "pal_hmac.h" #include +#include static EVP_MAC* g_evpMacHmac = NULL; static pthread_once_t g_evpMacHmacInit = PTHREAD_ONCE_INIT;