summaryrefslogtreecommitdiff
path: root/lib/compiler.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-03-29 13:46:40 -0400
committerGitHub <noreply@github.com>2020-03-29 13:46:40 -0400
commit3ce01b851ec8b320ed0e5da930b269668b3aa999 (patch)
tree745e3e816118b4514b2a827cd0bf030f6c4d5a5f /lib/compiler.h
parent47466c571f6468b8b8a92de4c451057bd96d1233 (diff)
parenta64f931ebadccffed73c027ae021a673bc3c7e0d (diff)
Merge pull request #6106 from opensourcerouting/gcc-plugin
tools: add extended printfrr format checking GCC plugin
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)))