diff options
Diffstat (limited to 'lib/errors')
-rw-r--r-- | lib/errors/vwarn.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/errors/vwarn.c b/lib/errors/vwarn.c index 342c391..bc1dda7 100644 --- a/lib/errors/vwarn.c +++ b/lib/errors/vwarn.c @@ -9,9 +9,11 @@ void vwarn(const char *fmt, va_list ap) { int save = errno; + flockfile(stderr); fprintf(stderr, "%s: ", mlib_progname()); vfprintf(stderr, fmt, ap); if (fmt[strlen(fmt) - 1] == ':') fprintf(stderr, " %s", strerror(save)); fputc('\n', stderr); + funlockfile(stderr); } |