Skip to content

Commit 78562d3

Browse files
committed
mingw: Include stdio.h for __MINGW_PRINTF_FORMAT
This macro is not pre-defined but defined in stdio.h.
1 parent 8351378 commit 78562d3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

include/ruby/internal/attr/format.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
*/
2323
#include "ruby/internal/has/attribute.h"
2424

25+
#if defined(__MINGW32__)
26+
#include <stdio.h> /* for __MINGW_PRINTF_FORMAT */
27+
#endif
28+
2529
/** Wraps (or simulates) `__attribute__((format))` */
2630
#if RBIMPL_HAS_ATTRIBUTE(format)
2731
# define RBIMPL_ATTR_FORMAT(x, y, z) __attribute__((__format__(x, y, z)))

0 commit comments

Comments
 (0)