浏览代码

[component][sal] Add some #ifdef on source code.

armink 6 年之前
父节点
当前提交
8cae067452
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 4 0
      components/net/sal_socket/impl/af_inet_at.c
  2. 4 0
      components/net/sal_socket/impl/af_inet_lwip.c

+ 4 - 0
components/net/sal_socket/impl/af_inet_at.c

@@ -20,6 +20,8 @@
 #include <dfs_poll.h>
 #endif
 
+#ifdef SAL_USING_AT
+
 #ifdef SAL_USING_POSIX
 static int at_poll(struct dfs_fd *file, struct rt_pollreq *req)
 {
@@ -111,3 +113,5 @@ int at_inet_init(void)
     return 0;
 }
 INIT_COMPONENT_EXPORT(at_inet_init);
+
+#endif /* SAL_USING_AT */

+ 4 - 0
components/net/sal_socket/impl/af_inet_lwip.c

@@ -30,6 +30,8 @@
 #endif
 #endif
 
+#ifdef SAL_USING_LWIP
+
 #ifdef SAL_USING_POSIX
 /*
  * Re-define lwip socket
@@ -293,3 +295,5 @@ int lwip_inet_init(void)
     return 0;
 }
 INIT_COMPONENT_EXPORT(lwip_inet_init);
+
+#endif /* SAL_USING_LWIP */