summaryrefslogtreecommitdiff
path: root/lib/compiler.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-08-02 17:42:06 +0200
committerDavid Lamparter <equinox@diac24.net>2020-03-29 10:45:46 +0200
commit07ef3e34ae0a414cefed99488abcbc167a9c0f3d (patch)
treed4e945a2c6e94d541e27d0a8bfef18f248a94f40 /lib/compiler.h
parent47466c571f6468b8b8a92de4c451057bd96d1233 (diff)
lib: prepare for plugin-based frr_format check
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/compiler.h')
-rw-r--r--lib/compiler.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/compiler.h b/lib/compiler.h
index e430925e69..217a60d888 100644
--- a/lib/compiler.h
+++ b/lib/compiler.h
@@ -305,7 +305,14 @@ extern "C" {
#include <inttypes.h>
#ifdef _FRR_ATTRIBUTE_PRINTFRR
-#define PRINTFRR(a, b) __attribute__((printfrr(a, b)))
+#define PRINTFRR(a, b) __attribute__((frr_format("frr_printf", a, b)))
+
+#undef PRIu64
+#undef PRId64
+#undef PRIx64
+#define PRIu64 "Lu"
+#define PRId64 "Ld"
+#define PRIx64 "Lx"
#else /* !_FRR_ATTRIBUTE_PRINTFRR */
#define PRINTFRR(a, b) __attribute__((format(printf, a, b)))