diff --git a/drivers/syslog/syslog_device.c b/drivers/syslog/syslog_device.c index 0364c603a2..22bc08eb35 100644 --- a/drivers/syslog/syslog_device.c +++ b/drivers/syslog/syslog_device.c @@ -578,7 +578,7 @@ int syslog_dev_flush(void) { int ret = 0;; -#ifndef CONFIG_DISABLE_MOUNTPOINT +#if defined(CONFIG_SYSLOG_FILE) && !defined(CONFIG_DISABLE_MOUNTPOINT) FAR struct inode *inode = g_syslog_dev.sl_file.f_inode; /* Is this a mountpoint? Does it support the sync method? */