Merge pull request #2691 from Lawlieta/develop_sal
[net][sal] Fix fcntl() function not support F_GETFL/F_SETFL operations for socketfd.
This commit is contained in:
commit
470b819dc8
|
@ -217,6 +217,19 @@ static int inet_getsockname(int socket, struct sockaddr *name, socklen_t *namele
|
||||||
return lwip_getsockname(socket, name, namelen);
|
return lwip_getsockname(socket, name, namelen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int inet_ioctlsocket(int socket, long cmd, void *arg)
|
||||||
|
{
|
||||||
|
switch (cmd)
|
||||||
|
{
|
||||||
|
case F_GETFL:
|
||||||
|
case F_SETFL:
|
||||||
|
return lwip_fcntl(socket, cmd, (int) arg);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return lwip_ioctl(socket, cmd, arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef SAL_USING_POSIX
|
#ifdef SAL_USING_POSIX
|
||||||
static int inet_poll(struct dfs_fd *file, struct rt_pollreq *req)
|
static int inet_poll(struct dfs_fd *file, struct rt_pollreq *req)
|
||||||
{
|
{
|
||||||
|
@ -278,7 +291,7 @@ static const struct sal_socket_ops lwip_socket_ops =
|
||||||
lwip_shutdown,
|
lwip_shutdown,
|
||||||
lwip_getpeername,
|
lwip_getpeername,
|
||||||
inet_getsockname,
|
inet_getsockname,
|
||||||
lwip_ioctl,
|
inet_ioctlsocket,
|
||||||
#ifdef SAL_USING_POSIX
|
#ifdef SAL_USING_POSIX
|
||||||
inet_poll,
|
inet_poll,
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue