diff options
Diffstat (limited to 'src/shared/util.h')
-rw-r--r-- | src/shared/util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index 8ac4bbc249..4be0b61773 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -36,6 +36,7 @@ #include <dirent.h> #include <sys/resource.h> #include <stddef.h> +#include <systemd/sd-journal.h> #include "macro.h" #include "time-util.h" @@ -531,6 +532,10 @@ static inline void umaskp(mode_t *u) { umask(*u); } +static inline void journal_closep(sd_journal **j) { + sd_journal_close(*j); +} + _malloc_ static inline void *malloc_multiply(size_t a, size_t b) { if (_unlikely_(b == 0 || a > ((size_t) -1) / b)) return NULL; |