From 0f5334586aac340c2153f3fef884433b9483a894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=94=9F?= <37073099+lianghongquan@users.noreply.github.com> Date: Tue, 24 Oct 2023 21:12:10 +0800 Subject: [PATCH] =?UTF-8?q?[libc][time]=E4=BF=AE=E5=A4=8DMDK=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E7=8E=AF=E5=A2=83=E4=B8=8Bdifftime()=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E5=A4=9A=E9=87=8D=E5=AE=9A=E4=B9=89=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#8174)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/compilers/common/ctime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/libc/compilers/common/ctime.c b/components/libc/compilers/common/ctime.c index a87db1dcea..8a6ca0dc67 100644 --- a/components/libc/compilers/common/ctime.c +++ b/components/libc/compilers/common/ctime.c @@ -325,12 +325,12 @@ char *ctime(const time_t *tim_p) } RTM_EXPORT(ctime); -#ifndef __ICCARM__ +#if (!defined __ARMCC_VERSION) && (!defined __CC_ARM) && (!defined __ICCARM__) double difftime(time_t time1, time_t time2) { return (double)(time1 - time2); } -#endif /* __ICCARM__ */ +#endif RTM_EXPORT(difftime); RTM_EXPORT(strftime); /* inherent in the toolchain */