summaryrefslogtreecommitdiffstats
path: root/src/diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diag.c')
-rw-r--r--src/diag.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/diag.c b/src/diag.c
index 53db98e..d7ffaa6 100644
--- a/src/diag.c
+++ b/src/diag.c
@@ -9,7 +9,15 @@
#include <assert.h>
#include <errno.h>
#include <stdarg.h>
-#include <stddef.h>
+#include <stdlib.h>
+
+noreturn void bfs_abortf(const char *format, ...) {
+ va_list args;
+ va_start(args, format);
+ vfprintf(stderr, format, args);
+ va_end(args);
+ abort();
+}
void bfs_perror(const struct bfs_ctx *ctx, const char *str) {
bfs_error(ctx, "%s: %m.\n", str);