# HG changeset patch # User Sebastien Jodogne # Date 1792665199 -7200 # Node ID d02e9e35fd0f6f28c2ef383adfcfa10c4dc5310e # Parent f4db015020485b7673a8c56adcafb6d70a9e817b partial fix for msvc diff -r f4db01502048 -r d02e9e35fd0f OrthancFramework/Resources/Patches/openssl-3.5.9.patch --- a/OrthancFramework/Resources/Patches/openssl-3.5.9.patch Thu Oct 22 11:49:52 2026 +0200 +++ b/OrthancFramework/Resources/Patches/openssl-3.5.9.patch Thu Oct 22 12:33:19 2026 +0200 @@ -1,3 +1,30 @@ +diff -urEb openssl-3.5.9.orig/crypto/async/async_local.h openssl-3.5.9/crypto/async/async_local.h +--- openssl-3.5.9.orig/crypto/async/async_local.h 2026-10-22 09:47:14.555901970 +0200 ++++ openssl-3.5.9/crypto/async/async_local.h 2026-10-22 12:24:55.463988766 +0200 +@@ -17,6 +17,7 @@ + #endif + + #if defined(_WIN32) ++#include + #include + #endif + +diff -urEb openssl-3.5.9.orig/crypto/cms/cms_lib.c openssl-3.5.9/crypto/cms/cms_lib.c +--- openssl-3.5.9.orig/crypto/cms/cms_lib.c 2026-10-22 09:47:14.558901938 +0200 ++++ openssl-3.5.9/crypto/cms/cms_lib.c 2026-10-22 12:29:07.812339312 +0200 +@@ -7,6 +7,12 @@ + * https://www.openssl.org/source/license.html + */ + ++#if defined(_WIN32) ++# include ++# include ++# include ++#endif ++ + #include + #include + #include diff -urEb openssl-3.5.9.orig/crypto/mem_sec.c openssl-3.5.9/crypto/mem_sec.c --- openssl-3.5.9.orig/crypto/mem_sec.c 2026-10-22 09:47:14.564901874 +0200 +++ openssl-3.5.9/crypto/mem_sec.c 2026-10-22 09:50:29.937930234 +0200 @@ -10,15 +37,42 @@ if (syscall(SYS_mlock2, sh.arena, sh.arena_size, MLOCK_ONFAULT) < 0) { if (errno == ENOSYS) { if (mlock(sh.arena, sh.arena_size) < 0) +diff -urEb openssl-3.5.9.orig/crypto/pkcs7/pk7_doit.c openssl-3.5.9/crypto/pkcs7/pk7_doit.c +--- openssl-3.5.9.orig/crypto/pkcs7/pk7_doit.c 2026-10-22 09:47:14.567901842 +0200 ++++ openssl-3.5.9/crypto/pkcs7/pk7_doit.c 2026-10-22 12:30:30.882791931 +0200 +@@ -7,6 +7,12 @@ + * https://www.openssl.org/source/license.html + */ + ++#if defined(_WIN32) ++# include ++# include ++# include ++#endif ++ + #include + #include + #include +diff -urEb openssl-3.5.9.orig/crypto/threads_win.c openssl-3.5.9/crypto/threads_win.c +--- openssl-3.5.9.orig/crypto/threads_win.c 2026-10-22 09:47:14.572901788 +0200 ++++ openssl-3.5.9/crypto/threads_win.c 2026-10-22 12:24:13.508260522 +0200 +@@ -8,6 +8,7 @@ + */ + + #if defined(_WIN32) ++#include + #include + #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600 + #define USE_RWLOCK diff -urEb openssl-3.5.9.orig/include/openssl/types.h openssl-3.5.9/include/openssl/types.h --- openssl-3.5.9.orig/include/openssl/types.h 2026-10-22 09:47:14.593901564 +0200 -+++ openssl-3.5.9/include/openssl/types.h 2026-10-22 11:22:57.228910355 +0200 ++++ openssl-3.5.9/include/openssl/types.h 2026-10-22 12:29:01.391381545 +0200 @@ -7,6 +7,13 @@ * https://www.openssl.org/source/license.html */ -+#ifdef __MINGW32__ -+/* This prevents a clash with X509_NAME in /usr/share/mingw-w64/include/wincrypt.h */ ++#if defined(_WIN32) ++/* On MinGW, this prevents a clash with X509_NAME in /usr/share/mingw-w64/include/wincrypt.h */ +# include +# include +# include @@ -29,12 +83,12 @@ * See https://github.com/openssl/openssl/issues/9981 diff -urEb openssl-3.5.9.orig/ssl/rio/rio_notifier.c openssl-3.5.9/ssl/rio/rio_notifier.c --- openssl-3.5.9.orig/ssl/rio/rio_notifier.c 2026-10-22 09:47:14.598901511 +0200 -+++ openssl-3.5.9/ssl/rio/rio_notifier.c 2026-10-22 11:22:29.869123827 +0200 ++++ openssl-3.5.9/ssl/rio/rio_notifier.c 2026-10-22 12:22:04.002093537 +0200 @@ -7,6 +7,10 @@ * https://www.openssl.org/source/license.html */ -+#ifdef __MINGW32__ ++#if defined(_WIN32) +# include "../crypto/bio/bio_local.h" /* This defines socklen_t */ +#endif +