Merge pull request #2157 from zhaojuntao/fix-dfs

[components][dfs] Refix #2100 PR
This commit is contained in:
Bernard Xiong 2019-01-06 18:25:04 +08:00 committed by GitHub
commit ff8a2709ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@
#include <lwp.h>
#endif
#ifdef RT_USING_DFS_DEVFS
#if defined(RT_USING_DFS_DEVFS) && defined(RT_USING_POSIX)
#include <libc.h>
#endif
@ -216,7 +216,7 @@ struct dfs_fd *fd_get(int fd)
struct dfs_fd *d;
struct dfs_fdtable *fdt;
#ifdef RT_USING_DFS_DEVFS
#if defined(RT_USING_DFS_DEVFS) && defined(RT_USING_POSIX)
if ((0 <= fd) && (fd <= 2))
fd = libc_stdio_get_console();
#endif