diff options
| -rw-r--r-- | xmalloc.c | 3 | ||||
| -rw-r--r-- | xmalloc.h | 1 |
2 files changed, 3 insertions, 1 deletions
@@ -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(); @@ -1,7 +1,6 @@ #pragma once #include <stddef.h> -#include <string.h> #include "macros.h" void *xmalloc(size_t size) XMALLOC; |
