From 8a9bd9af9d3f2f55f666ef6c6c459ce96dda3b74 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 21 Jun 2016 15:08:09 -0600 Subject: [PATCH] SYSLOG: Some rather complex conditional compilation missed a case. --- drivers/syslog/syslog_channel.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c index 2afee2a1ab..a36cb6e70f 100644 --- a/drivers/syslog/syslog_channel.c +++ b/drivers/syslog/syslog_channel.c @@ -57,7 +57,17 @@ * Private Function Prototypes ****************************************************************************/ -#ifndef CONFIG_ARCH_LOWPUTC +#if defined(CONFIG_SYSLOG_SERIAL_CONSOLE) && defined(CONFIG_ARCH_LOWPUTC) +# define HAVE_LOWPUTC +#elif !defined(CONFIG_RAMLOG_SYSLOG) +# define NEED_LOWPUTC +#endif + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +#ifdef NEED_LOWPUTC static int syslog_default_putc(int ch); #endif static int syslog_default_flush(void); @@ -73,7 +83,7 @@ const struct syslog_channel_s g_default_channel = ramlog_putc, syslog_default_flush }; -#elif defined(CONFIG_SYSLOG_SERIAL_CONSOLE) && defined(CONFIG_ARCH_LOWPUTC) +#elif defined(HAVE_LOWPUTC) const struct syslog_channel_s g_default_channel = { up_putc, @@ -105,7 +115,7 @@ FAR const struct syslog_channel_s *g_syslog_channel = &g_default_channel; * ****************************************************************************/ -#ifndef CONFIG_ARCH_LOWPUTC +#ifdef NEED_LOWPUTC static int syslog_default_putc(int ch) { return ch;