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

   ## Summary
   
   Some apps files use functions from `stdlib.h` and `unistd.h` without 
including them. They got the declarations only because NuttX's `stdio.h` 
included other NuttX headers, which apache/nuttx#20565 stops:
   
   - `system/ymodem/rb_main.c`, `sb_main.c`: `exit()`, `atoi()` (`stdlib.h`)
   - `fsutils/passwd/passwd_delete.c`: `unlink()` (`unistd.h`)
   - `netutils/plcatool/plcatool.c`: `close()` (`unistd.h`)
   - `testing/cmocka`: the downloaded `cmocka.c` uses `ftruncate()`. 
`cmocka_platform.h`, which `cmocka.c` includes, now includes `unistd.h`.
   - `system/zlib`: the downloaded `gzlib.c`, `gzread.c` and `gzwrite.c` use 
`lseek()`, `read()` and `write()`. The zlib build now passes `-include 
unistd.h`. `Z_HAVE_UNISTD_H` would also change `z_off_t`, but only inside zlib, 
not for the programs that include `zlib.h`.
   
   The first commit fixes the old nxstyle errors and two spelling errors in the 
four C files, because CI checks each changed file as a whole.
   
   ## Impact
   
   None on master. Needed by apache/nuttx#20565.
   
   ## Testing
   
   With apache/nuttx#20565, Make, `-Werror`, on macOS: 
`esp32c6-devkitc:oa_tc6`, `stm32f746g-disco:dropbear` and 
`linum-stm32h753bi:zbus` failed before and build after. `qemu-armv7a:full` 
(with `make -k`) compiles the zlib and ymodem files without errors; its 
remaining errors are in libcxx and mbedtls, as on master. `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]

Reply via email to