about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-08-21 00:49:46 -0400
committerRich Felker <dalias@aerifal.cx>2013-08-21 00:49:46 -0400
commit580b8d8c52624f17e39b19e8cc9e0cbea1510b45 (patch)
tree1148a92bd85c45d21870625582323ddc1c4ea2e1 /src
parente449974dc54562bcb9a8a4c578e92d3f12ca67bb (diff)
downloadmusl-580b8d8c52624f17e39b19e8cc9e0cbea1510b45.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/legacy/err.c7
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)