Skip to content

Commit ea31cea

Browse files
HedongGaoxiaoxiang781216
authored andcommitted
net/ethernet: fix compilation issues
fix compilation issues Signed-off-by: gaohedong <gaohedong@xiaomi.com>
1 parent c0fa2ca commit ea31cea

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

net/inet/inet_sockif.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,12 +721,14 @@ static int inet_get_socketlevel_option(FAR struct socket *psock, int option,
721721
return -EINVAL;
722722
}
723723

724+
# ifdef NET_UDP_HAVE_STACK
724725
if (psock->s_type == SOCK_DGRAM)
725726
{
726727
FAR struct udp_conn_s *conn = psock->s_conn;
727728
*(FAR int *)value = (conn->timestamp != 0);
728729
}
729730
else
731+
# endif
730732
{
731733
return -ENOPROTOOPT;
732734
}
@@ -1023,6 +1025,7 @@ static int inet_set_socketlevel_option(FAR struct socket *psock, int option,
10231025
return -EINVAL;
10241026
}
10251027

1028+
# ifdef NET_UDP_HAVE_STACK
10261029
if (psock->s_type == SOCK_DGRAM)
10271030
{
10281031
conn_lock(psock->s_conn);
@@ -1038,6 +1041,7 @@ static int inet_set_socketlevel_option(FAR struct socket *psock, int option,
10381041
conn_unlock(psock->s_conn);
10391042
}
10401043
else
1044+
# endif
10411045
{
10421046
return -ENOPROTOOPT;
10431047
}

net/pkt/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ config NET_PKT
99
bool "Socket packet socket support"
1010
default n
1111
select NETDEV_IFINDEX
12+
select NET_READAHEAD
1213
---help---
1314
Enable or disable support for packet sockets.
1415

0 commit comments

Comments
 (0)