summaryrefslogtreecommitdiff
path: root/lib/libc/err/vwarn.c
blob: 2f485d93699c61427d635492d2468511a900e182 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdarg.h>
#include <stdio.h>

extern char *__progname;

void vwarn(const char *fmt, va_list args)
{
	fprintf(stderr, "%s: ", __progname);

	if (fmt != NULL) {
		vfprintf(stderr, fmt, args);
		fprintf(stderr, ": ");
	}

	perror(NULL);
}