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 */