提交 c3cc7a29 编写于 作者: M MurphyZhao

[components][dfs] 移除冗余代码

[components][net] 修复 Kconfig
[components][net][sal] 还原对 SAL 框架的修改,在 proto_ops 结构体实例赋值位置修改
Signed-off-by: NMurphyZhao <d2014zjt@163.com>
上级 58a6b512
......@@ -29,8 +29,6 @@
#define POLLHUP (0x08)
#define POLLNVAL (0x10)
#define POLLMASK_DEFAULT (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
typedef unsigned int nfds_t;
struct pollfd
......@@ -39,12 +37,10 @@ struct pollfd
short events;
short revents;
};
#endif /* !defined(POLLIN) && !defined(POLLOUT) */
int poll(struct pollfd *fds, nfds_t nfds, int timeout);
#else /* !defined(POLLIN) && !defined(POLLOUT) */
#define POLLMASK_DEFAULT (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
int poll(struct pollfd *fds, nfds_t nfds, int timeout);
#endif /* !defined(POLLIN) && !defined(POLLOUT) */
#endif /* RT_USING_POSIX */
#endif /* DFS_POLL_H__ */
......@@ -73,7 +73,7 @@ config RT_USING_LWIP
bool "lwIP v2.1.0"
endchoice
if (RT_USING_LWIP210)
if (RT_USING_LWIP210 || RT_USING_LWIP202)
config RT_USING_LWIP_IPV6
bool "IPV6 protocol"
default n
......
......@@ -271,8 +271,8 @@ static const struct proto_ops lwip_inet_stream_ops = {
lwip_listen,
lwip_connect,
inet_accept,
lwip_sendto,
lwip_recvfrom,
(int (*)(int, const void *, size_t, int, const struct sockaddr *, socklen_t))lwip_sendto,
(int (*)(int, void *, size_t, int, struct sockaddr *, socklen_t *))lwip_recvfrom,
lwip_getsockopt,
//TODO fix on 1.4.1
lwip_setsockopt,
......
......@@ -51,13 +51,8 @@ struct proto_ops
int (*listen) (int s, int backlog);
int (*connect) (int s, const struct sockaddr *name, socklen_t namelen);
int (*accept) (int s, struct sockaddr *addr, socklen_t *addrlen);
#if LWIP_VERSION >= 0x20100ff
ssize_t (*sendto) (int s, const void *data, size_t size, int flags, const struct sockaddr *to, socklen_t tolen);
ssize_t (*recvfrom) (int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
#else
int (*sendto) (int s, const void *data, size_t size, int flags, const struct sockaddr *to, socklen_t tolen);
int (*recvfrom) (int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
#endif
int (*getsockopt) (int s, int level, int optname, void *optval, socklen_t *optlen);
int (*setsockopt) (int s, int level, int optname, const void *optval, socklen_t optlen);
int (*shutdown) (int s, int how);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册