openssl: fix mingwW64 build (#455104)
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
From af3a3f8205968f9e652efa7adf2a359f4eb9d9cc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexandr Nedvedicky <sashan@openssl.org>
|
||||||
|
Date: Mon, 6 Oct 2025 09:33:09 +0200
|
||||||
|
Subject: [PATCH] OPENSSL_SYS_WINDOWS is also enabled for mingw build
|
||||||
|
|
||||||
|
the test_n() in bioprinttest.c must differentiate between
|
||||||
|
MSVC runtime libc and ming runtime libc. The function
|
||||||
|
_set_printf_count_output() must be called when openssl
|
||||||
|
is linked with MSVC libc only.
|
||||||
|
|
||||||
|
Fixes #28679
|
||||||
|
|
||||||
|
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||||
|
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
|
||||||
|
Reviewed-by: Neil Horman <nhorman@openssl.org>
|
||||||
|
(Merged from https://github.com/openssl/openssl/pull/28759)
|
||||||
|
---
|
||||||
|
test/bioprinttest.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/bioprinttest.c b/test/bioprinttest.c
|
||||||
|
index bd99b9820ecc0..28730631bc201 100644
|
||||||
|
--- a/test/bioprinttest.c
|
||||||
|
+++ b/test/bioprinttest.c
|
||||||
|
@@ -541,7 +541,7 @@ static int test_n(int i)
|
||||||
|
ptrdiff_t t;
|
||||||
|
} n = { 0 };
|
||||||
|
|
||||||
|
-#if defined(OPENSSL_SYS_WINDOWS)
|
||||||
|
+#if defined(_set_printf_count_output)
|
||||||
|
/*
|
||||||
|
* MS CRT is special and throws an exception when %n is used even
|
||||||
|
* in non-*_s versions of printf routines, and there is a special function
|
||||||
@@ -422,6 +422,9 @@ in
|
|||||||
else
|
else
|
||||||
./3.5/use-etc-ssl-certs.patch
|
./3.5/use-etc-ssl-certs.patch
|
||||||
)
|
)
|
||||||
|
]
|
||||||
|
++ lib.optionals stdenv.hostPlatform.isMinGW [
|
||||||
|
./3.5/fix-mingw-linking.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
withDocs = true;
|
withDocs = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user