casaroli opened a new pull request, #3850: URL: https://github.com/apache/nuttx-apps/pull/3850
## Summary `nxdiag_main()` calls `exit()` with `EXIT_SUCCESS` and `EXIT_FAILURE` in every configuration, but `nxdiag.c` included `stdlib.h` only with `CONFIG_SYSTEM_NXDIAG_ESPRESSIF_CHIP_WO_TOOL`. Since apache/nuttx#20565, `stdio.h` no longer brings in `stdlib.h`, so `esp32-devkitc:nxdiag` fails to build: ``` nxdiag.c:241:7: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration] nxdiag.c:241:12: error: 'EXIT_FAILURE' undeclared (first use in this function) ``` This stops the `xtensa-01` CI job of every nuttx PR (for example apache/nuttx#20640), and fail-fast then cancels the other Linux jobs. This PR includes `stdlib.h` unconditionally. ## Impact Build fix only. No change in behaviour. ## Testing `esp32-devkitc:nxdiag` with nuttx master b3418f076a5, xtensa-esp-elf 14.2.0, `-Werror`: - apps master 467e22088: fails with the errors above. - with this PR: builds. `tools/checkpatch.sh -c -u -m -g` passes. -- 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]
