]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: fix printf format on NetBSD 8656/head
authorDavid Lamparter <equinox@diac24.net>
Mon, 12 Apr 2021 22:52:55 +0000 (00:52 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 18 Jun 2021 19:05:21 +0000 (21:05 +0200)
*sigh*.  It doesn't accept `%m` otherwise.

Signed-off-by: David Lamparter <equinox@diac24.net>
lib/compiler.h

index bbfe01b569c3f4116e49e6e4ad63abdfb8e731d6..8b8ec08c25540e0f0a93fd383ea4cb463dfe9028 100644 (file)
@@ -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...)