diff options
| author | armink <[email protected]> | 2021-04-15 14:12:02 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2021-04-15 14:12:02 +0800 |
| commit | 6eb6752398901671ae7d7076d8f363196724b991 (patch) | |
| tree | 37ed8b5f4feb099caeccb38d103e3edd304660a4 /components | |
| parent | 3ae6ca1fb09a1ec254285f8e5522e8d233f1c85c (diff) | |
[libc/time] Fix MDK build error when using gmtime_r.
Diffstat (limited to 'components')
| -rw-r--r-- | components/libc/compilers/common/sys/time.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h index 2a40b7b805..b3adaedfab 100644 --- a/components/libc/compilers/common/sys/time.h +++ b/components/libc/compilers/common/sys/time.h @@ -57,6 +57,10 @@ time_t timegm(struct tm * const t); int gettimeofday(struct timeval *tv, struct timezone *tz); int settimeofday(const struct timeval *tv, const struct timezone *tz); +#if defined(__ARMCC_VERSION) || defined (__ICCARM__) +struct tm *gmtime_r(const time_t *timep, struct tm *r); +#endif + #ifdef RT_USING_POSIX #include <sys/types.h> /* posix clock and timer */ |
