We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96165a5 commit bdf5a1fCopy full SHA for bdf5a1f
components/finsh/shell.c
@@ -32,6 +32,11 @@
32
#include <fcntl.h>
33
#endif /* DFS_USING_POSIX */
34
35
+#ifdef RT_USING_POSIX_STDIO
36
+#include <unistd.h>
37
+#include <posix/stdio.h>
38
+#endif /* RT_USING_POSIX_STDIO */
39
+
40
/* finsh thread */
41
#ifndef RT_USING_HEAP
42
static struct rt_thread finsh_thread;
@@ -154,7 +159,7 @@ int finsh_getchar(void)
154
159
#ifdef RT_USING_DEVICE
155
160
char ch = 0;
156
161
#ifdef RT_USING_POSIX_STDIO
157
- if(read(STDIN_FILENO, &ch, 1) > 0)
162
+ if(read(rt_posix_stdio_get_console(), &ch, 1) > 0)
158
163
{
164
return ch;
165
}
0 commit comments