diff --git a/net/icmp/Kconfig b/net/icmp/Kconfig index 04d7b3f5d1..8ce7ceaa77 100644 --- a/net/icmp/Kconfig +++ b/net/icmp/Kconfig @@ -3,7 +3,6 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if NET_IPv4 menu "ICMP Networking Support" config NET_ICMP @@ -44,4 +43,3 @@ config NET_ICMP_NPOLLWAITERS endif # NET_ICMP_SOCKET endif # NET_ICMP && !NET_ICMP_NO_STACK endmenu # ICMP Networking Support -endif # NET_IPv4 diff --git a/net/icmpv6/Kconfig b/net/icmpv6/Kconfig index 1ef9e0a88e..248f0224f0 100644 --- a/net/icmpv6/Kconfig +++ b/net/icmpv6/Kconfig @@ -3,7 +3,6 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if NET_IPv6 menu "ICMPv6 Networking Support" config NET_ICMPv6 @@ -213,4 +212,3 @@ endif # NET_ICMPv6_SOCKET endif # NET_ICMPv6 && !NET_ICMPv6_NO_STACK endmenu # ICMPv6 Networking Support -endif # NET_IPv6 diff --git a/net/utils/Make.defs b/net/utils/Make.defs index 91490d9d5d..f09accdec2 100644 --- a/net/utils/Make.defs +++ b/net/utils/Make.defs @@ -44,9 +44,13 @@ endif # ICMP utilities ifeq ($(CONFIG_NET_ICMP),y) -NET_CSRCS += net_icmpchksum.c + ifneq ($(CONFIG_NET_ICMP_NO_STACK),y) + NET_CSRCS += net_icmpchksum.c + endif else ifeq ($(CONFIG_NET_ICMPv6),y) -NET_CSRCS += net_icmpchksum.c + ifneq ($(CONFIG_NET_ICMPv6_NO_STACK),y) + NET_CSRCS += net_icmpchksum.c + endif endif # Bound device find