summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/cairo-script/csi-replay.c2
-rw-r--r--util/cairo-trace/trace.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/util/cairo-script/csi-replay.c b/util/cairo-script/csi-replay.c
index 4c66b7752..9d9be72c2 100644
--- a/util/cairo-script/csi-replay.c
+++ b/util/cairo-script/csi-replay.c
@@ -41,7 +41,9 @@
#include <stdlib.h>
#include <string.h>
+#if defined(CAIRO_HAS_XLIB_SURFACE) || defined(CAIRO_HAS_XLIB_XRENDER_SURFACE)
static const cairo_user_data_key_t _key;
+#endif
#define SINGLE_SURFACE 1
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index cc4b18c0d..bb79c85b9 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -99,8 +99,13 @@
#define CAIRO_BITSWAP8(c) ((((c) * 0x0802LU & 0x22110LU) | ((c) * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16)
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
-#define CAIRO_PRINTF_FORMAT(fmt_index, va_index) \
+#ifdef __MINGW32__
+#define CAIRO_PRINTF_FORMAT(fmt_index, va_index) \
+ __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index)))
+#else
+#define CAIRO_PRINTF_FORMAT(fmt_index, va_index) \
__attribute__((__format__(__printf__, fmt_index, va_index)))
+#endif
#else
#define CAIRO_PRINTF_FORMAT(fmt_index, va_index)
#endif