From f7ba4a63413cf6a0d64ea03f7cb63eb58d1ad099 Mon Sep 17 00:00:00 2001 From: Meco <920369182@qq.com> Date: Wed, 5 Aug 2020 02:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9D=A1=E4=BB=B6=E7=BC=96?= =?UTF-8?q?=E8=AF=91=EF=BC=8C=E9=98=B2=E6=AD=A2RT=5FUSING=5FDFS=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=AE=9A=E4=B9=89=E6=97=B6=20=5Fsys=5Fflen()=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=BC=96=E8=AF=91=E8=AD=A6=E5=91=8A=EF=BC=9Astat?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=AE=9A=E4=B9=89=E4=BD=86=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=A2=AB=E8=B0=83=E7=94=A8=20=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/compilers/armlibc/stubs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/libc/compilers/armlibc/stubs.c b/components/libc/compilers/armlibc/stubs.c index b6ffb37b0f..8acde16495 100644 --- a/components/libc/compilers/armlibc/stubs.c +++ b/components/libc/compilers/armlibc/stubs.c @@ -9,6 +9,8 @@ * 2013-11-24 aozima fixed _sys_read()/_sys_write() issues. * 2014-08-03 bernard If using msh, use system() implementation * in msh. + * 2020-08-05 Meco Man fixed _sys_flen() compiling-warning when + * RT_USING_DFS is not defined */ #include @@ -265,7 +267,9 @@ RT_WEAK void _sys_exit(int return_code) */ long _sys_flen(FILEHANDLE fh) { +#ifdef RT_USING_DFS struct stat stat; +#endif if (fh < STDERR) return -1;