From a1de5eb88479515535e5de090ded800455c3d4a7 Mon Sep 17 00:00:00 2001 From: Daniel Fiala Date: Tue, 27 Sep 2022 06:01:25 +0200 Subject: [PATCH] Disable printf format checking on MinGW Fixes openssl#19185 Reviewed-by: Richard Levitte Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/19292) --- include/openssl/bio.h.in | 1 + test/testutil.h | 4 +++- test/testutil/output.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/openssl/bio.h.in b/include/openssl/bio.h.in index e413bb41cb..6105c602fd 100644 --- a/include/openssl/bio.h.in +++ b/include/openssl/bio.h.in @@ -870,6 +870,7 @@ void BIO_copy_next_retry(BIO *b); # define ossl_bio__attr__(x) # if defined(__GNUC__) && defined(__STDC_VERSION__) \ + && !defined(__MINGW32__) && !defined(__MINGW64__) \ && !defined(__APPLE__) /* * Because we support the 'z' modifier, which made its appearance in C99, diff --git a/test/testutil.h b/test/testutil.h index 0a050bb060..fde9ff046b 100644 --- a/test/testutil.h +++ b/test/testutil.h @@ -286,7 +286,9 @@ const OPTIONS *test_get_options(void); */ # define PRINTF_FORMAT(a, b) -# if defined(__GNUC__) && defined(__STDC_VERSION__) +# if defined(__GNUC__) && defined(__STDC_VERSION__) \ + && !defined(__MINGW32__) && !defined(__MINGW64__) \ + && !defined(__APPLE__) /* * Because we support the 'z' modifier, which made its appearance in C99, * we can't use __attribute__ with pre C99 dialects. diff --git a/test/testutil/output.h b/test/testutil/output.h index 5e4f4c2390..0e4de09704 100644 --- a/test/testutil/output.h +++ b/test/testutil/output.h @@ -14,6 +14,7 @@ # define ossl_test__attr__(x) # if defined(__GNUC__) && defined(__STDC_VERSION__) \ + && !defined(__MINGW32__) && !defined(__MINGW64__) \ && !defined(__APPLE__) /* * Because we support the 'z' modifier, which made its appearance in C99, -- GitLab