Fixed bug #650.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8382 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
2746f0ae06
commit
f0ba10ad8c
|
@ -133,12 +133,12 @@ static void rtc_decode(uint32_t tv_sec,
|
|||
|
||||
/* If the conversion is successful the function returns a pointer
|
||||
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);
|
||||
osalDbgAssert(t != NULL, "conversion failed");
|
||||
#else
|
||||
struct tm *t = localtime(&tv_sec);
|
||||
memcpy(&timp, t, sizeof(struct tm));
|
||||
memcpy(&tim, t, sizeof(struct tm));
|
||||
#endif
|
||||
|
||||
rtcConvertStructTmToDateTime(&tim, tv_msec, timespec);
|
||||
|
|
Loading…
Reference in New Issue