summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-06-11 21:52:24 +0800
committerGitHub <[email protected]>2018-06-11 21:52:24 +0800
commitbce30adddb51e613c29b2bb402b0814ef2969758 (patch)
tree64c8dd6484be40c22f46c49a325106e2368a9d75 /components
parent9acd72be37f73ecc0f310dbc1213b9818b51a810 (diff)
parent04061750036c083c32599297d946cefd60e71eaa (diff)
Merge pull request #1526 from armink/fix_dfs_fatfs
[components][dfs][fatfs] Add return 0 to get_fattime when RT_USING_LI…
Diffstat (limited to 'components')
-rw-r--r--components/dfs/filesystems/elmfat/dfs_elm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/dfs/filesystems/elmfat/dfs_elm.c b/components/dfs/filesystems/elmfat/dfs_elm.c
index 4c17911f96..a5dfdd0258 100644
--- a/components/dfs/filesystems/elmfat/dfs_elm.c
+++ b/components/dfs/filesystems/elmfat/dfs_elm.c
@@ -924,10 +924,12 @@ DRESULT disk_ioctl(BYTE drv, BYTE ctrl, void *buff)
DWORD get_fattime(void)
{
+ DWORD fat_time = 0;
+
+#ifdef RT_USING_LIBC
time_t now;
struct tm *p_tm;
struct tm tm_now;
- DWORD fat_time;
/* get current time */
now = time(RT_NULL);
@@ -947,6 +949,7 @@ DWORD get_fattime(void)
(DWORD)tm_now.tm_hour << 11 |
(DWORD)tm_now.tm_min << 5 |
(DWORD)tm_now.tm_sec / 2 ;
+#endif /* RT_USING_LIBC */
return fat_time;
}