4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 20:23:32 +08:00

Merge pull request #1901 from armink/fix_sal

Fix sal
This commit is contained in:
Bernard Xiong 2018-10-16 11:13:01 +08:00 committed by GitHub
commit 5d6f122ffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -23,6 +23,8 @@
#define LOG_TAG "at.skt" #define LOG_TAG "at.skt"
#include <at_log.h> #include <at_log.h>
#ifdef AT_USING_SOCKET
#define HTONS_PORT(x) ((((x) & 0x00ffUL) << 8) | (((x) & 0xff00UL) >> 8)) #define HTONS_PORT(x) ((((x) & 0x00ffUL) << 8) | (((x) & 0xff00UL) >> 8))
#define NIPQUAD(addr) \ #define NIPQUAD(addr) \
((unsigned char *)&addr)[0], \ ((unsigned char *)&addr)[0], \
@ -1175,3 +1177,5 @@ void at_socket_device_register(const struct at_device_ops *ops)
RT_ASSERT(ops->at_set_event_cb); RT_ASSERT(ops->at_set_event_cb);
at_dev_ops = (struct at_device_ops *) ops; at_dev_ops = (struct at_device_ops *) ops;
} }
#endif /* AT_USING_SOCKET */

View File

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

View File

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