mirror of
https://github.com/apache/nuttx.git
synced 2026-09-22 14:41:29 +08:00
net/ethernet: fix compilation issues
fix compilation issues Signed-off-by: gaohedong <gaohedong@xiaomi.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user