diff --git a/drivers/console/posix_arch_console.c b/drivers/console/posix_arch_console.c index 75c2f57dde9e4..73d4411230f68 100644 --- a/drivers/console/posix_arch_console.c +++ b/drivers/console/posix_arch_console.c @@ -12,6 +12,7 @@ static char stdout_buff[_STDOUT_BUF_SIZE]; static int n_pend; /* Number of pending characters in buffer */ +#if defined(CONFIG_PRINTK) || defined(CONFIG_STDOUT_CONSOLE) static int print_char(int c) { int printnow = 0; @@ -34,6 +35,7 @@ static int print_char(int c) } return c; } +#endif /* defined(CONFIG_PRINTK) || defined(CONFIG_STDOUT_CONSOLE) */ /** * Ensure that whatever was written thru printk is displayed now