提交 38c49099 编写于 作者: B Bernard Xiong

[libc] Fix the printf issue when disable DFS

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