From a924da830e0105c981bef650cb1391e9580e819d Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 17 Jul 2022 02:58:43 -0400 Subject: [libc] 修复difftime函数在IAR下的编译错误 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/compilers/common/ctime.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'components') diff --git a/components/libc/compilers/common/ctime.c b/components/libc/compilers/common/ctime.c index 6cef1e222d..34d646ff9d 100644 --- a/components/libc/compilers/common/ctime.c +++ b/components/libc/compilers/common/ctime.c @@ -324,10 +324,12 @@ char* ctime(const time_t *tim_p) } RTM_EXPORT(ctime); +#ifndef __ICCARM__ double difftime(time_t time1, time_t time2) { return (double)(time1 - time2); } +#endif /* __ICCARM__ */ RTM_EXPORT(difftime); RTM_EXPORT(strftime); /* inherent in the toolchain */ -- cgit v1.3.1