casaroli opened a new pull request, #4151:
URL: https://github.com/apache/nuttx-apps/pull/4151

   ## Summary
   
   Two apps fixes for network configurations that do not build:
   
   - `netutils/dhcpc`: DHCP gives IPv4 addresses, and `dhcpc.c` calls 
`netlib_get_ipv4addr()` and `netlib_set_ipv4addr()`, which exist only with 
`CONFIG_NET_IPv4`. `NETUTILS_DHCPC` and `SYSTEM_DHCPC_RENEW` depended only on 
`NET_UDP`. Now they also depend on `NET_IPv4`.
   - `netutils/netinit`: `g_ipv6_hostaddr`, `g_ipv6_draddr` and 
`g_ipv6_netmask` are used only by `netinit_set_ipv6addrs()`, which needs a 
network device. Without one (only usrsock, for example sim:rpproxy + 
`CONFIG_NET_IPv6`), `-Werror` stopped the build on the unused arrays. Now the 
arrays have the same condition as the function.
   
   The kernel side is apache/nuttx#22377. Each PR fixes its own errors; the two 
configurations below build only with both.
   
   ## Impact
   
   Build fix. A configuration with IPv4 off no longer offers the DHCP client. 
No other change.
   
   ## Testing
   
   Builds with `-Werror` in the CI image (gcc 12.3), nuttx with 
apache/nuttx#22377:
   
   | Config | apps master | this PR |
   |---|---|---|
   | rv-virt:netnsh, IPv4 off, IPv6 on | FAIL: `dhcpc.c:833: implicit 
declaration of function 'netlib_get_ipv4addr'` | OK |
   | sim:rpproxy + NET_IPv6 | FAIL: `netinit.c:227: 'g_ipv6_hostaddr' defined 
but not used` (also `g_ipv6_draddr`, `g_ipv6_netmask`) | OK |
   
   Also OK: rv-virt:netnsh, qemu-armv8a:netnsh, rv-virt:knetnsh64, sim:rpproxy. 
The first commit only fixes the nxstyle errors that `checkpatch.sh` reports for 
the whole of `netinit.c` (blank lines and indent in `netinit_checkpath()`).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to