diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-08-21 00:49:46 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-08-21 00:49:46 -0400 |
commit | 580b8d8c52624f17e39b19e8cc9e0cbea1510b45 (patch) | |
tree | 1148a92bd85c45d21870625582323ddc1c4ea2e1 | |
parent | e449974dc54562bcb9a8a4c578e92d3f12ca67bb (diff) | |
download | musl-580b8d8c52624f17e39b19e8cc9e0cbea1510b45.tar.gz musl-580b8d8c52624f17e39b19e8cc9e0cbea1510b45.tar.bz2 musl-580b8d8c52624f17e39b19e8cc9e0cbea1510b45.tar.xz musl-580b8d8c52624f17e39b19e8cc9e0cbea1510b45.zip |
unbreak vwarn: print ": " before errno message
patch by Strake. this seems to be a regression caused by fixing the
behavior of perror("") to match perror(0) at some point in the past.
-rw-r--r-- | src/legacy/err.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/legacy/err.c b/src/legacy/err.c index 7b167b36..0d6ab524 100644 --- a/src/legacy/err.c +++ b/src/legacy/err.c @@ -8,8 +8,11 @@ extern char *__progname; void vwarn(const char *fmt, va_list ap) { fprintf (stderr, "%s: ", __progname); - if (fmt) vfprintf(stderr, fmt, ap); - perror(""); + if (fmt) { + vfprintf(stderr, fmt, ap); + fputs (": ", stderr); + } + perror(0); } void vwarnx(const char *fmt, va_list ap) |