aboutsummaryrefslogtreecommitdiff
path: root/xmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xmalloc.c')
-rw-r--r--xmalloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmalloc.c b/xmalloc.c
index aecb5787..7322953a 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -2,11 +2,14 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
#include "xmalloc.h"
static NORETURN COLD void
fatal_error(const char *msg, int err)
{
+ syslog(LOG_ERR, "%s: %s", msg, strerror(err));
errno = err;
perror(msg);
abort();