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

This commit is contained in:
Meco Man 2021-09-27 07:02:41 -04:00
parent 86bb54fde6
commit 8e287cfdf7
1 changed files with 3 additions and 2 deletions

View File

@ -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;