This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new ea31ceac23b net/ethernet: fix compilation issues
ea31ceac23b is described below
commit ea31ceac23b51b08b177befd0386bdfe7df13119
Author: gaohedong <[email protected]>
AuthorDate: Wed May 28 22:20:01 2025 +0800
net/ethernet: fix compilation issues
fix compilation issues
Signed-off-by: gaohedong <[email protected]>
---
net/inet/inet_sockif.c | 4 ++++
net/pkt/Kconfig | 1 +
2 files changed, 5 insertions(+)
diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c
index a28e29336b5..208fa3f2c36 100644
--- a/net/inet/inet_sockif.c
+++ b/net/inet/inet_sockif.c
@@ -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;
}
diff --git a/net/pkt/Kconfig b/net/pkt/Kconfig
index acecd593f29..e88fe94b652 100644
--- a/net/pkt/Kconfig
+++ b/net/pkt/Kconfig
@@ -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.