mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
net/ethernet: fix compilation issues
fix compilation issues Signed-off-by: gaohedong <gaohedong@xiaomi.com>
This commit is contained in:
parent
c0fa2cae3d
commit
ea31ceac23
2 changed files with 5 additions and 0 deletions
|
|
@ -721,12 +721,14 @@ static int inet_get_socketlevel_option(FAR struct socket *psock, int option,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
# ifdef NET_UDP_HAVE_STACK
|
||||
if (psock->s_type == SOCK_DGRAM)
|
||||
{
|
||||
FAR struct udp_conn_s *conn = psock->s_conn;
|
||||
*(FAR int *)value = (conn->timestamp != 0);
|
||||
}
|
||||
else
|
||||
# endif
|
||||
{
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
|
|
@ -1023,6 +1025,7 @@ static int inet_set_socketlevel_option(FAR struct socket *psock, int option,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
# ifdef NET_UDP_HAVE_STACK
|
||||
if (psock->s_type == SOCK_DGRAM)
|
||||
{
|
||||
conn_lock(psock->s_conn);
|
||||
|
|
@ -1038,6 +1041,7 @@ static int inet_set_socketlevel_option(FAR struct socket *psock, int option,
|
|||
conn_unlock(psock->s_conn);
|
||||
}
|
||||
else
|
||||
# endif
|
||||
{
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ config NET_PKT
|
|||
bool "Socket packet socket support"
|
||||
default n
|
||||
select NETDEV_IFINDEX
|
||||
select NET_READAHEAD
|
||||
---help---
|
||||
Enable or disable support for packet sockets.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue