From a6e7b334e9400b8e4e9f8a4a0aa0f8cbd2df5253 Mon Sep 17 00:00:00 2001 From: heyuanjie <943313837@qq.com> Date: Mon, 11 Jun 2018 17:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B3=BB=E7=BB=9F=E8=B0=83?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/lwp/lwp_syscall.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/lwp/lwp_syscall.c b/components/lwp/lwp_syscall.c index be5e15dcb3..f0d2f0e9eb 100644 --- a/components/lwp/lwp_syscall.c +++ b/components/lwp/lwp_syscall.c @@ -199,6 +199,11 @@ void *sys_realloc(void *rmem, size_t newsize) return rt_lwp_mem_realloc(rmem, newsize); } +int sys_fstat(int file, struct stat *buf) +{ + return fstat(file, buf); +} + const static void* func_table[] = { (void *)sys_exit, // 0x01 @@ -219,6 +224,8 @@ const static void* func_table[] = (void *)sys_malloc, // 0x0d (void *)sys_free, // 0x0e + (void *)sys_realloc, //0x0f + (void *)sys_fstat, // 0x10 }; const void *lwp_get_sys_api(rt_uint32_t number)