diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-10-23 08:12:42 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-10-23 08:12:42 +0000 |
commit | f0ba10ad8c373c603b6d692abd0b613a0dc9d84d (patch) | |
tree | b95edcba6e47372a5406132cf39fb42ae05ca9d0 /os/hal | |
parent | 2746f0ae06c7405ca85e1c381e54d2c950c5e402 (diff) | |
download | ChibiOS-f0ba10ad8c373c603b6d692abd0b613a0dc9d84d.tar.gz ChibiOS-f0ba10ad8c373c603b6d692abd0b613a0dc9d84d.tar.bz2 ChibiOS-f0ba10ad8c373c603b6d692abd0b613a0dc9d84d.zip |
Fixed bug #650.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8382 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/ports/STM32/LLD/RTCv1/rtc_lld.c | 4 |
1 files 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);
|