diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c index f6c12416513bd..5f37ff8a560c2 100644 --- a/net/inet/inet_sockif.c +++ b/net/inet/inet_sockif.c @@ -762,12 +762,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; } @@ -1064,6 +1066,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) { net_lock(); @@ -1079,6 +1082,7 @@ static int inet_set_socketlevel_option(FAR struct socket *psock, int option, net_unlock(); } else +# endif { return -ENOPROTOOPT; } diff --git a/net/pkt/Kconfig b/net/pkt/Kconfig index acecd593f29ea..e88fe94b65238 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.