--- openssl-3.6.0/test/bioprinttest.c.orig	2025-10-01 14:11:48.000000000 +0200
+++ openssl-3.6.0/test/bioprinttest.c	2025-10-07 09:38:48.321058200 +0200
@@ -543,6 +543,10 @@
     } n = { 0 }, std_n = { 0 };
 
 #if defined(OPENSSL_SYS_WINDOWS)
+#if defined(__MINGW32__) && !defined(_UCRT)
+    // No _set_printf_count_output() with MSVCRT
+    skip_libc_check = true;
+#else
     /*
      * 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
@@ -554,6 +558,7 @@
                   ", skipping the checks against libc");
         skip_libc_check = true;
     }
+#endif
 #elif defined(__OpenBSD__)
     {
         static bool note_printed;
