From: Karel Zak Date: Tue, 10 Oct 2017 12:45:55 +0000 (+0200) Subject: logger: add dummy fallback for OSX X-Git-Tag: v2.31~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=87ac63c9fa14a71084711eda8d4ddf6ad9515ce3;p=thirdparty%2Futil-linux.git logger: add dummy fallback for OSX Signed-off-by: Karel Zak --- diff --git a/misc-utils/logger.c b/misc-utils/logger.c index f8dbb2cef9..bf2db9c6cf 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -489,8 +489,13 @@ static void write_output(struct logger_ctl *ctl, const char *const msg) * * The libc syslog() function reconnects on failed send(). * Let's do the same to be robust. [kzak -- Oct 2017] + * + * MSG_NOSIGNAL is POSIX.1-2008 compatible, but it for example + * no suported by apple-darwin15.6.0. */ - +#ifndef MSG_NOSIGNAL +# define MSG_NOSIGNAL 0 +#endif if (sendmsg(ctl->fd, &message, MSG_NOSIGNAL) < 0) { logger_reopen(ctl); if (sendmsg(ctl->fd, &message, MSG_NOSIGNAL) < 0)