You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "casaroli (via GitHub)" <gi...@apache.org> on 2026/10/13 12:41:09 UTC

[PR] include: Fix sys/wait.h without stdbool.h, and add MAXPATHLEN and in6addr_loopback. [nuttx]

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

   ## Summary
   
   Three small gaps in the headers, one commit each:
   
   - `sys/wait.h`: `WIFCONTINUED()`, `WIFSIGNALED()`, `WIFSTOPPED()` and `WSTOPSIG()` expand to `false`, but `sys/wait.h` does not include `stdbool.h`. A C program that uses them without `stdbool.h` does not compile (`'false' undeclared`). They now expand to 0.
   - `netinet/in.h`: POSIX defines `in6addr_loopback` next to `in6addr_any`, and `IN6_IS_ADDR_MC_NODELOCAL()`, `_SITELOCAL()`, `_ORGLOCAL()` and `_GLOBAL()` next to `IN6_IS_ADDR_MC_LINKLOCAL()`. NuttX has only the latter of each. This PR adds them, with the multicast scopes of RFC 4291.
   - `sys/param.h`: BSD code sizes path buffers with `MAXPATHLEN`, as it does host names with `MAXHOSTNAMELEN`, which NuttX already defines. This PR adds it as `PATH_MAX`.
   
   ## Impact
   
   Headers only, plus the `in6addr_loopback` constant in `lib_addrconfig.c`. Existing code does not change. More portable code compiles.
   
   ## Testing
   
   A test file that includes `sys/param.h`, `sys/wait.h` and `netinet/in.h` (no `stdbool.h`) and uses `MAXPATHLEN`, the four `sys/wait.h` macros, the four new `IN6_IS_ADDR_MC_*()` macros and `in6addr_loopback`, compiled with `aarch64-none-elf-gcc -std=c99 -Wall -fsyntax-only` against the `qemu-armv8a:nsh` headers:
   
   ```
   master:  error: 'MAXPATHLEN' undeclared here (not in a function)
            error: 'false' undeclared (first use in this function)
            error: implicit declaration of function 'IN6_IS_ADDR_MC_NODELOCAL'
            error: 'in6addr_loopback' undeclared (first use in this function)
   this PR: no errors, no warnings
   ```
   
   Build: `qemu-armv8a:nsh`, `qemu-armv8a:knsh` and `lm3s6965-ek:qemu-flat`.
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] include: Fix sys/wait.h without stdbool.h, and add MAXPATHLEN and in6addr_loopback. [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #20635:
URL: https://github.com/apache/nuttx/pull/20635


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] include: Fix sys/wait.h without stdbool.h, and add MAXPATHLEN and in6addr_loopback. [nuttx]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20635:
URL: https://github.com/apache/nuttx/pull/20635#issuecomment-6156489651

   <!-- membrowse-pr-comment -->
   ## <img src="https://membrowse.com/membrowse-logo.svg" height="24" align="top"> MemBrowse Memory Report
   
   *No memory changes detected for:*
   - [arduino-mega2560](https://membrowse.com/public/apache/nuttx/target/arduino-mega2560/compare?head=56a1263818c6afc051399a6ec3dd41a17eb097d7&base=bb4d8691759e59aaab6f9fb604a29cf3e6d3705a)
   - [esp32-devkitc](https://membrowse.com/public/apache/nuttx/target/esp32-devkitc/compare?head=56a1263818c6afc051399a6ec3dd41a17eb097d7&base=bb4d8691759e59aaab6f9fb604a29cf3e6d3705a)
   - [hifive1-revb](https://membrowse.com/public/apache/nuttx/target/hifive1-revb/compare?head=56a1263818c6afc051399a6ec3dd41a17eb097d7&base=bb4d8691759e59aaab6f9fb604a29cf3e6d3705a)
   - [mirtoo](https://membrowse.com/public/apache/nuttx/target/mirtoo/compare?head=56a1263818c6afc051399a6ec3dd41a17eb097d7&base=bb4d8691759e59aaab6f9fb604a29cf3e6d3705a)
   - [qemu-armv8a](https://membrowse.com/public/apache/nuttx/target/qemu-armv8a/compare?head=56a1263818c6afc051399a6ec3dd41a17eb097d7&base=bb4d8691759e59aaab6f9fb604a29cf3e6d3705a)
   - [qemu-intel64](https://membrowse.com/public/apache/nuttx/target/qemu-intel64/compare?head=56a1263818c6afc051399a6ec3dd41a17eb097d7&base=bb4d8691759e59aaab6f9fb604a29cf3e6d3705a)
   - [rx65n-rsk2mb](https://membrowse.com/public/apache/nuttx/target/rx65n-rsk2mb/compare?head=56a1263818c6afc051399a6ec3dd41a17eb097d7&base=bb4d8691759e59aaab6f9fb604a29cf3e6d3705a)
   - [s698pm-dkit](https://membrowse.com/public/apache/nuttx/target/s698pm-dkit/compare?head=56a1263818c6afc051399a6ec3dd41a17eb097d7&base=bb4d8691759e59aaab6f9fb604a29cf3e6d3705a)
   - [stm32-nucleo-f103rb](https://membrowse.com/public/apache/nuttx/target/stm32-nucleo-f103rb/compare?head=56a1263818c6afc051399a6ec3dd41a17eb097d7&base=bb4d8691759e59aaab6f9fb604a29cf3e6d3705a)
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org