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)