]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
OPENSSL_SYS_WINDOWS is also enabled for mingw build
authorAlexandr Nedvedicky <sashan@openssl.org>
Mon, 6 Oct 2025 07:33:09 +0000 (09:33 +0200)
committerNeil Horman <nhorman@openssl.org>
Wed, 8 Oct 2025 12:07:17 +0000 (08:07 -0400)
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

index bd99b9820ecc02dc5043f36aa1ef2dcc0d7be924..28730631bc201c040b445f4480442457380eb66a 100644 (file)
@@ -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