summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/atoms.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/atoms.c b/src/atoms.c
index e5c33e5..559579f 100644
--- a/src/atoms.c
+++ b/src/atoms.c
@@ -13,6 +13,14 @@
#include <stdarg.h>
#include "xcb_atom.h"
+#ifndef __has_attribute
+# define __has_attribute(x) 0 /* Compatibility with older compilers. */
+#endif
+
+#if __has_attribute(__format__) \
+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203)
+__attribute__((__format__(__printf__,1,2)))
+#endif
static char *makename(const char *fmt, ...)
{
char *ret;