From f0ba10ad8c373c603b6d692abd0b613a0dc9d84d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 23 Oct 2015 08:12:42 +0000 Subject: [PATCH] Fixed bug #650. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8382 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c b/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c index 13b2cf9b9..16cb9b500 100644 --- a/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c +++ b/os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c @@ -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);