Mercurial > hg > orthanc
view OrthancFramework/Resources/Patches/openssl-3.5.9.patch @ 7191:3f2967fe5baa default tip
typo
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Thu, 22 Oct 2026 17:11:46 +0200 |
| parents | 2e9cfd37eff1 |
| children |
line wrap: on
line source
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 @@ -562,7 +562,7 @@ ret = 2; #endif -#if defined(OPENSSL_SYS_LINUX) && defined(MLOCK_ONFAULT) && defined(SYS_mlock2) +#if defined(OPENSSL_SYS_LINUX) && defined(MLOCK_ONFAULT) && defined(SYS_mlock2) && !defined(__LSB_VERSION__) // "syscall()" is not available in LSB 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/ml_kem/ml_kem.c openssl-3.5.9/crypto/ml_kem/ml_kem.c --- openssl-3.5.9.orig/crypto/ml_kem/ml_kem.c 2026-10-22 09:47:14.564901874 +0200 +++ openssl-3.5.9/crypto/ml_kem/ml_kem.c 2026-10-22 13:07:38.748621689 +0200 @@ -26,7 +26,7 @@ #error "Invalid unequal lengths of ML-KEM shared secret and random inputs" #endif -#if UINT_MAX < UINT32_MAX +#if !defined(_MSC_VER) && (UINT_MAX < UINT32_MAX) #error "Unsupported compiler: sizeof(unsigned int) < sizeof(uint32_t)" #endif 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 12:29:01.391381545 +0200 @@ -7,6 +7,13 @@ * https://www.openssl.org/source/license.html */ +#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> +#endif + /* * Unfortunate workaround to avoid symbol conflict with wincrypt.h * See https://github.com/openssl/openssl/issues/9981 diff -urEb openssl-3.5.9.orig/providers/implementations/signature/mac_legacy_sig.c openssl-3.5.9/providers/implementations/signature/mac_legacy_sig.c --- openssl-3.5.9.orig/providers/implementations/signature/mac_legacy_sig.c 2026-10-22 09:47:14.597901521 +0200 +++ openssl-3.5.9/providers/implementations/signature/mac_legacy_sig.c 2026-10-22 13:09:03.601002817 +0200 @@ -10,7 +10,6 @@ /* We need to use some engine deprecated APIs */ #define OPENSSL_SUPPRESS_DEPRECATED -#include <stdbool.h> #include <openssl/crypto.h> #include <openssl/evp.h> #include <openssl/core_dispatch.h> 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 12:22:04.002093537 +0200 @@ -7,6 +7,10 @@ * https://www.openssl.org/source/license.html */ +#if defined(_WIN32) +# include "../crypto/bio/bio_local.h" /* This defines socklen_t */ +#endif + #include "internal/sockets.h" #include <openssl/bio.h> #include <openssl/err.h>
