git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8382 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2015-10-23 08:12:42 +00:00
parent 2746f0ae06
commit f0ba10ad8c
1 changed files with 2 additions and 2 deletions

View File

@ -133,12 +133,12 @@ static void rtc_decode(uint32_t tv_sec,
/* If the conversion is successful the function returns a pointer /* If the conversion is successful the function returns a pointer
to the object the result was written into.*/ to the object the result was written into.*/
#if defined __GNUC__ #if defined(__GNUC__) || defined(__CC_ARM)
t = localtime_r((time_t *)&(tv_sec), &tim); t = localtime_r((time_t *)&(tv_sec), &tim);
osalDbgAssert(t != NULL, "conversion failed"); osalDbgAssert(t != NULL, "conversion failed");
#else #else
struct tm *t = localtime(&tv_sec); struct tm *t = localtime(&tv_sec);
memcpy(&timp, t, sizeof(struct tm)); memcpy(&tim, t, sizeof(struct tm));
#endif #endif
rtcConvertStructTmToDateTime(&tim, tv_msec, timespec); rtcConvertStructTmToDateTime(&tim, tv_msec, timespec);