diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index 48b60caeaf..c279490dec 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -48,6 +48,7 @@ #include #endif +#ifdef RT_USING_DFS #ifdef RT_USING_DFS_DEVFS #include @@ -209,7 +210,7 @@ const static struct dfs_file_ops _serial_fops = serial_fops_poll, }; #endif - +#endif /* * Serial poll routines */ diff --git a/components/drivers/src/pipe.c b/components/drivers/src/pipe.c index b455870c8a..bc9ed5f9a2 100644 --- a/components/drivers/src/pipe.c +++ b/components/drivers/src/pipe.c @@ -23,8 +23,10 @@ */ #include #include +#if defined(RT_USING_DFS) #include #include +#endif #if defined(RT_USING_DFS) && defined(RT_USING_DFS_DEVFS) static int pipe_open(struct dfs_fd *fd)