From ca846ff82c5ed74cd5d71f316d4a3e428655cc1f Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 13 Apr 2021 00:52:55 +0200 Subject: lib: fix printf format on NetBSD *sigh*. It doesn't accept `%m` otherwise. Signed-off-by: David Lamparter --- lib/compiler.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/compiler.h') diff --git a/lib/compiler.h b/lib/compiler.h index bbfe01b569..8b8ec08c25 100644 --- a/lib/compiler.h +++ b/lib/compiler.h @@ -356,7 +356,11 @@ extern "C" { #define PRIx64 "Lx" #else /* !_FRR_ATTRIBUTE_PRINTFRR */ +#ifdef __NetBSD__ +#define PRINTFRR(a, b) __attribute__((format(gnu_syslog, a, b))) +#else #define PRINTFRR(a, b) __attribute__((format(printf, a, b))) +#endif /* frr-format plugin is C-only for now, so no point in doing these shenanigans * for C++... (also they can break some C++ stuff...) -- cgit v1.2.3