From 7e4ce26c27523f7a2ab9667a3d730edaff9f07f4 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 6 Nov 2016 04:32:16 -0600 Subject: [PATCH] use __MINGW_PRINTF_FORMAT for BIO_* print functions if available --- patches/bio.h.patch | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 patches/bio.h.patch diff --git a/patches/bio.h.patch b/patches/bio.h.patch new file mode 100644 index 0000000..7212b54 --- /dev/null +++ b/patches/bio.h.patch @@ -0,0 +1,36 @@ +--- include/openssl/bio.h.orig Mon Oct 3 06:09:28 2016 ++++ include/openssl/bio.h Sun Nov 6 04:24:57 2016 +@@ -678,8 +678,24 @@ + + /*long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);*/ + ++#ifdef __MINGW_PRINTF_FORMAT + int + BIO_printf(BIO *bio, const char *format, ...) ++ __attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 3), __nonnull__(2))); ++int ++BIO_vprintf(BIO *bio, const char *format, va_list args) ++ __attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 0), __nonnull__(2))); ++int ++BIO_snprintf(char *buf, size_t n, const char *format, ...) ++ __attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 4), ++ __nonnull__(3))); ++int ++BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) ++ __attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 0), ++ __nonnull__(3))); ++#else ++int ++BIO_printf(BIO *bio, const char *format, ...) + __attribute__((__format__(__printf__, 2, 3), __nonnull__(2))); + int + BIO_vprintf(BIO *bio, const char *format, va_list args) +@@ -692,6 +708,8 @@ + BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) + __attribute__((__deprecated__, __format__(__printf__, 3, 0), + __nonnull__(3))); ++#endif ++ + + /* BEGIN ERROR CODES */ + /* The following lines are auto generated by the script mkerr.pl. Any changes