diff --git a/client/util.c b/client/util.c index 1d83e518..3a78a7c4 100644 --- a/client/util.c +++ b/client/util.c @@ -17,7 +17,7 @@ /* Client versions of logging functions */ static void -vlog(const char *msg, va_list args) +vlog_cli(const char *msg, va_list args) { char buf[1024]; @@ -38,7 +38,7 @@ bug(const char *msg, ...) va_start(args, msg); cleanup(); fputs("Internal error: ", stderr); - vlog(msg, args); + vlog_cli(msg, args); vfprintf(stderr, msg, args); va_end(args); exit(1); @@ -51,7 +51,7 @@ die(const char *msg, ...) va_start(args, msg); cleanup(); - vlog(msg, args); + vlog_cli(msg, args); va_end(args); exit(1); } diff --git a/lib/birdlib.h b/lib/birdlib.h index 57149cc9..41aa8b3f 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -16,6 +16,8 @@ #include "lib/alloca.h" #include "lib/macro.h" +#include + /* Ugly structure offset handling macros */ #define SAME_TYPE(a, b) ({ int _ = ((a) != (b)); !_; }) @@ -211,6 +213,7 @@ void log_msg(const char *msg, ...); void log_rl(struct tbf *rl, const char *msg, ...); void die(const char *msg, ...) NORET; void bug(const char *msg, ...) NORET; +void vlog(int class, const char *msg, va_list args); #define L_DEBUG "\001" /* Debugging messages */ #define L_TRACE "\002" /* Protocol tracing */ diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c index 9d77211b..384da303 100644 --- a/sysdep/unix/log.c +++ b/sysdep/unix/log.c @@ -337,7 +337,7 @@ log_prepare(log_buffer *buf, int class) buf->pos[LBP_MSG] = buf->buf.pos; } -static void +void vlog(int class, const char *msg, va_list args) { static _Thread_local log_buffer buf;