[components][dfs][fatfs] Add return 0 to get_fattime when RT_USING_LIBC not enable.

This commit is contained in:
armink 2018-06-11 19:56:13 +08:00
parent 22d5e3c3a9
commit 0406175003
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}