diff --git a/xmalloc.c b/xmalloc.c index aecb5787..7322953a 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -2,11 +2,14 @@ #include #include #include +#include +#include #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(); diff --git a/xmalloc.h b/xmalloc.h index d4e48f79..90d63031 100644 --- a/xmalloc.h +++ b/xmalloc.h @@ -1,7 +1,6 @@ #pragma once #include -#include #include "macros.h" void *xmalloc(size_t size) XMALLOC;