diff options
| author | David Lamparter <equinox@diac24.net> | 2021-04-13 00:52:55 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2021-06-18 21:05:21 +0200 |
| commit | ca846ff82c5ed74cd5d71f316d4a3e428655cc1f (patch) | |
| tree | 5c4721a59e1ed91b08f3688da9b1064610acd092 /lib/compiler.h | |
| parent | c6610ea98f44ed2d5d9556076322d3a6a9023675 (diff) | |
lib: fix printf format on NetBSD
*sigh*. It doesn't accept `%m` otherwise.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/compiler.h')
| -rw-r--r-- | lib/compiler.h | 4 |
1 files changed, 4 insertions, 0 deletions
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...) |
