shithub: tlsclient

ref: 1a02ec3b5c4f3cb41c7a5b377c5fffa0a415e3b7
dir: /libc/sysfatal.c/

View raw version
#include <u.h>
#include <libc.h>

#include <stdlib.h>

static void
_sysfatalimpl(char *fmt, va_list arg)
{
	vfprint(2, fmt, arg);
	fprint(2, "\n");
	exit(1);
}

void (*_sysfatal)(char *fmt, va_list arg) = _sysfatalimpl;

void
sysfatal(char *fmt, ...)
{
	va_list arg;

	va_start(arg, fmt);
	(*_sysfatal)(fmt, arg);
	va_end(arg);
}