summaryrefslogtreecommitdiff
path: root/lib/compiler.h
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2021-05-03 11:17:36 -0400
committerGitHub <noreply@github.com>2021-05-03 11:17:36 -0400
commitf71e1ff6a98d0e244c7da11d870d14e31b517811 (patch)
tree0657d1718fa1018c0e8aa3bea76266f9dd6677ad /lib/compiler.h
parent92046e65409fe0ba2935e886cfb778253d5d8d4e (diff)
parent4f1a6d98da0703b066a1ae92dcac7c8f6ae3b1e6 (diff)
Merge pull request #8545 from opensourcerouting/assert-our-own
*: make our own assert() actually work
Diffstat (limited to 'lib/compiler.h')
-rw-r--r--lib/compiler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler.h b/lib/compiler.h
index b7a142bdee..86cf347e01 100644
--- a/lib/compiler.h
+++ b/lib/compiler.h
@@ -373,6 +373,10 @@ CPP_NOTICE("time to remove this CONFDATE block")
#else /* !_FRR_ATTRIBUTE_PRINTFRR */
#define PRINTFRR(a, b) __attribute__((format(printf, a, b)))
+/* frr-format plugin is C-only for now, so no point in doing these shenanigans
+ * for C++... (also they can break some C++ stuff...)
+ */
+#ifndef __cplusplus
/* these should be typedefs, but might also be #define */
#ifdef uint64_t
#undef uint64_t
@@ -400,6 +404,8 @@ _Static_assert(sizeof(_uint64_t) == 8 && sizeof(_int64_t) == 8,
#define PRIu64 "llu"
#define PRId64 "lld"
#define PRIx64 "llx"
+
+#endif /* !__cplusplus */
#endif /* !_FRR_ATTRIBUTE_PRINTFRR */
#ifdef __cplusplus