shithub: tlsclient

ref: 721c69b2b23bbc846aa0c6cfadcc135830d5d0c9
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);
}