diff options
author | Thomas Haller <thaller@redhat.com> | 2022-04-22 19:28:55 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-04-22 19:31:36 (GMT) |
commit | d3bd278a9a6b869f5a476a515c915ee8213e370e (patch) | |
tree | b3b9f7eb5d5090933156a8d7ad10caa0a0cd82b0 | |
parent | a30b26d3b360bb0717161acecf2ce96188a0cb46 (diff) | |
download | libnl-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.h | 6 |
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 * @{ |