From ea2565ce4e9faf1ef2b8ca6d62ef767bc75a49a6 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 25 Jan 2021 00:11:21 +0100 Subject: [PATCH] Drop %m gnuism from internal log macro Signed-off-by: Joachim Wiberg --- src/syslogd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/syslogd.h b/src/syslogd.h index 9d44722..d68e59d 100644 --- a/src/syslogd.h +++ b/src/syslogd.h @@ -34,8 +34,10 @@ #include "config.h" +#include #include #include /* struct addrinfo */ +#include #ifdef __linux__ #include #endif @@ -131,7 +133,7 @@ #define str(s) #s /* Helper internal log macros */ -#define ERR(fmt, args...) flog(LOG_SYSLOG | LOG_ERR, fmt ": %m", ##args) +#define ERR(fmt, args...) flog(LOG_SYSLOG | LOG_ERR, fmt ": %s", ##args, strerror(errno)) #define ERRX(fmt, args...) flog(LOG_SYSLOG | LOG_ERR, fmt, ##args) #define WARN(fmt, args...) flog(LOG_SYSLOG | LOG_WARN, fmt, ##args) #define NOTE(fmt, args...) flog(LOG_SYSLOG | LOG_NOTICE, fmt, ##args)