Mercurial > hg > orthanc
changeset 7185:d02e9e35fd0f
partial fix for msvc
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Thu, 22 Oct 2026 12:33:19 +0200 |
| parents | f4db01502048 |
| children | 2e9cfd37eff1 |
| files | OrthancFramework/Resources/Patches/openssl-3.5.9.patch |
| diffstat | 1 files changed, 59 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 <winsock2.h> + #include <windows.h> + #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 <winsock2.h> ++# include <windows.h> ++# include <wincrypt.h> ++#endif ++ + #include <openssl/asn1t.h> + #include <openssl/x509v3.h> + #include <openssl/err.h> 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 <winsock2.h> ++# include <windows.h> ++# include <wincrypt.h> ++#endif ++ + #include <stdio.h> + #include <openssl/rand.h> + #include <openssl/objects.h> +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 <winsock2.h> + #include <windows.h> + #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 <winsock2.h> +# include <windows.h> +# include <wincrypt.h> @@ -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 +
