net: Move NET_TCP/UDP_HAVE_STACK to netconfig.h

Now the HAVE_PFINET(6)_SOCKETS depends on NET_TCP/UDP_HAVE_STACK, which
is previously defined in net/ folder and cannot be included.
Considering many places use this check, maybe moving them to netconfig.h
could be better.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
Zhe Weng
2024-11-21 12:05:25 +08:00
committed by Xiang Xiao
parent 085830612c
commit 752245aca4
6 changed files with 22 additions and 16 deletions
+3 -2
View File
@@ -30,6 +30,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/fs/procfs.h>
#include <nuttx/net/netconfig.h>
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_NET)
@@ -184,7 +185,7 @@ ssize_t netprocfs_read_mldstats(FAR struct netprocfs_file_s *priv,
*
****************************************************************************/
#if defined(CONFIG_NET_TCP) && !defined(CONFIG_NET_TCP_NO_STACK)
#ifdef NET_TCP_HAVE_STACK
ssize_t netprocfs_read_tcpstats(FAR struct netprocfs_file_s *priv,
FAR char *buffer, size_t buflen);
#endif
@@ -207,7 +208,7 @@ ssize_t netprocfs_read_tcpstats(FAR struct netprocfs_file_s *priv,
*
****************************************************************************/
#if defined(CONFIG_NET_UDP) && !defined(CONFIG_NET_UDP_NO_STACK)
#ifdef NET_UDP_HAVE_STACK
ssize_t netprocfs_read_udpstats(FAR struct netprocfs_file_s *priv,
FAR char *buffer, size_t buflen);
#endif