提交 8e287cfd 编写于 作者: mysterywolf's avatar mysterywolf

[libc][newlib][syscalls] fileno(stdout)->STDOUT_FILENO

上级 86bb54fd
......@@ -12,8 +12,9 @@
*/
#include <reent.h>
#include <errno.h>
#include <sys/errno.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include <rtthread.h>
......@@ -219,7 +220,7 @@ _ssize_t _write_r(struct _reent *ptr, int fd, const void *buf, size_t nbytes)
{
#ifndef RT_USING_DFS
#if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
if (fileno(stdout) == fd)
if (STDOUT_FILENO == fd)
{
rt_device_t console;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册