This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 6f1bf3ddc11126183151a100f94306f2c5d0b718 Author: Marco Casaroli <[email protected]> AuthorDate: Thu Nov 26 07:07:36 2026 +0100 netutils/netinit: Define the static IPv6 addresses only where used. g_ipv6_hostaddr, g_ipv6_draddr and g_ipv6_netmask are used only by netinit_set_ipv6addrs(), which needs a network device and is not built for IEEE 802.15.4. Without a network device (only usrsock, for example sim:rpproxy with CONFIG_NET_IPv6), the three arrays were defined but not used, and -Werror stopped the build. Use the same condition for the arrays as for netinit_set_ipv6addrs(). Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- netutils/netinit/netinit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/netutils/netinit/netinit.c b/netutils/netinit/netinit.c index ef540e700..f61faa5b1 100644 --- a/netutils/netinit/netinit.c +++ b/netutils/netinit/netinit.c @@ -220,8 +220,9 @@ static sem_t g_notify_sem; bool g_use_dhcpc; #endif -#if defined(CONFIG_NET_IPv6) && !defined(CONFIG_NET_ICMPv6_AUTOCONF) && \ - !defined(CONFIG_NET_6LOWPAN) +#if defined(NETINIT_HAVE_NETDEV) && defined(CONFIG_NET_IPv6) && \ + !defined(CONFIG_NET_ICMPv6_AUTOCONF) && !defined(CONFIG_NET_6LOWPAN) && \ + !defined(CONFIG_NET_IEEE802154) /* Host IPv6 address */ static const uint16_t g_ipv6_hostaddr[8] = @@ -263,7 +264,7 @@ static const uint16_t g_ipv6_netmask[8] = HTONS(CONFIG_NETINIT_IPv6NETMASK_7), HTONS(CONFIG_NETINIT_IPv6NETMASK_8), }; -#endif /* CONFIG_NET_IPv6 && !CONFIG_NET_ICMPv6_AUTOCONF && !CONFIG_NET_6LOWPAN */ +#endif /* NETINIT_HAVE_NETDEV && CONFIG_NET_IPv6 && ... */ /**************************************************************************** * Private Functions
