about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/legacy/err.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/legacy/err.c b/src/legacy/err.c
index 0f748538..7b167b36 100644
--- a/src/legacy/err.c
+++ b/src/legacy/err.c
@@ -3,14 +3,18 @@
 #include <stdarg.h>
 #include <stdlib.h>
 
+extern char *__progname;
+
 void vwarn(const char *fmt, va_list ap)
 {
+	fprintf (stderr, "%s: ", __progname);
 	if (fmt) vfprintf(stderr, fmt, ap);
 	perror("");
 }
 
 void vwarnx(const char *fmt, va_list ap)
 {
+	fprintf (stderr, "%s: ", __progname);
 	if (fmt) vfprintf(stderr, fmt, ap);
 	putc('\n', stderr);
 }