浏览代码

[libc] Does export time API if RTC component is not used.

Bernard Xiong 9 年之前
父节点
当前提交
83404b825b
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      components/libc/armlibc/libc_syms.c

+ 3 - 1
components/libc/armlibc/libc_syms.c

@@ -27,11 +27,13 @@ RTM_EXPORT(memchr);
 RTM_EXPORT(toupper);
 RTM_EXPORT(atoi);
 
+#ifdef RT_USING_RTC
 RTM_EXPORT(localtime);
 RTM_EXPORT(time);
+#endif
 
 /* import the full stdio for printf */
-#ifdef __MICROLIB
+#if defined(RT_USING_MODULE) && defined(__MICROLIB)
 #error "[RT_USING_LIBC] Please use standard libc but not microlib."
 #endif