diff --git a/src/pulse/gccmacro.h b/src/pulse/gccmacro.h index 1e818ff47..e906f5954 100644 --- a/src/pulse/gccmacro.h +++ b/src/pulse/gccmacro.h @@ -25,8 +25,15 @@ /** \file * GCC attribute macros */ -#ifdef __GNUC__ +#if defined(__GNUC__) +#ifdef __MINGW32__ +/* libintl overrides printf with a #define. As this breaks this attribute, + * it has a workaround. However the workaround isn't enabled for MINGW + * builds (only cygwin) */ +#define PA_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (__printf__, a, b))) +#else #define PA_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b))) +#endif #else /** If we're in GNU C, use some magic for detecting invalid format strings */ #define PA_GCC_PRINTF_ATTR(a,b)