summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-04-22 19:28:55 (GMT)
committerThomas Haller <thaller@redhat.com>2022-04-22 19:31:36 (GMT)
commitd3bd278a9a6b869f5a476a515c915ee8213e370e (patch)
treeb3b9f7eb5d5090933156a8d7ad10caa0a0cd82b0
parenta30b26d3b360bb0717161acecf2ce96188a0cb46 (diff)
downloadlibnl-d3bd278a9a6b869f5a476a515c915ee8213e370e.zip
libnl-d3bd278a9a6b869f5a476a515c915ee8213e370e.tar.gz
libnl-d3bd278a9a6b869f5a476a515c915ee8213e370e.tar.bz2
netlink/utils.h: add internal _nl_attribute_printf macro for public headers
-rw-r--r--include/netlink/utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/netlink/utils.h b/include/netlink/utils.h
index 08be8e5..ccd163d 100644
--- a/include/netlink/utils.h
+++ b/include/netlink/utils.h
@@ -13,6 +13,12 @@
extern "C" {
#endif
+#if defined(__GNUC__) && __GNUC__ > 5
+#define _nl_attribute_printf(a, b) __attribute__((__format__(printf, a, b)))
+#else
+#define _nl_attribute_printf(a, b)
+#endif
+
/**
* @name Probability Constants
* @{