aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/attributes.h')
-rw-r--r--src/attributes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/attributes.h b/src/attributes.h
index bf4e2658..11c699f3 100644
--- a/src/attributes.h
+++ b/src/attributes.h
@@ -4,6 +4,12 @@
#ifndef SERD_SRC_ATTRIBUTES_H
#define SERD_SRC_ATTRIBUTES_H
+#if defined(__GNUC__)
+# define SERD_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1)))
+#else
+# define SERD_LOG_FUNC(fmt, arg1)
+#endif
+
#ifdef __GNUC__
# define SERD_MALLOC_FUNC __attribute__((malloc))
#else