]> 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:12:09 +0000 (08:12 -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)

(cherry picked from commit af3a3f8205968f9e652efa7adf2a359f4eb9d9cc)

test/bioprinttest.c

index f9bd916db56efba55fd88a6d44fcfb15acb7c5cc..1de1dd7d9a6ccbc20677d68b2c0f2c76e73bb56b 100644 (file)
@@ -542,7 +542,7 @@ static int test_n(int i)
         ptrdiff_t t;
     } n = { 0 }, std_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