Преглед изворни кода

[libc/time] Fix MDK build error when using gmtime_r.

armink пре 4 година
родитељ
комит
6eb6752398
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      components/libc/compilers/common/sys/time.h

+ 4 - 0
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 */