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

View file

@ -64,6 +64,18 @@
* NET_SOCK_PROTOCOL);
*/
/* The TCP/UDP stack, which is used for determining HAVE_PFINET(6)_SOCKETS */
#undef NET_TCP_HAVE_STACK
#if defined(CONFIG_NET_TCP) && !defined(CONFIG_NET_TCP_NO_STACK)
# define NET_TCP_HAVE_STACK 1
#endif
#undef NET_UDP_HAVE_STACK
#if defined(CONFIG_NET_UDP) && !defined(CONFIG_NET_UDP_NO_STACK)
# define NET_UDP_HAVE_STACK 1
#endif
/* The address family that we used to create the socket really does not
* matter. It should, however, be valid in the current configuration.
*/