This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit a0b08520252a2b1d439118a90abe6b51a0440c61 Author: Marco Casaroli <[email protected]> AuthorDate: Wed Oct 28 00:37:33 2026 +0100 include/sys/param.h: Add MAXNAMLEN and NBBY. MAXNAMLEN, the BSD name of NAME_MAX, is in <sys/param.h> of the BSDs and musl, and glibc has it in <dirent.h>. <sys/param.h> has the other two of these names, MAXHOSTNAMELEN and MAXPATHLEN, but not this one, so programs that use it (util-linux's wall) did not compile. NBBY, the number of bits in a byte, is in <sys/param.h> of the BSDs, glibc and musl. Programs use it to size bit arrays (libedit's vis.c did not compile without it). Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- include/sys/param.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/param.h b/include/sys/param.h index 2ca11c53be5..b3fe4f0050e 100644 --- a/include/sys/param.h +++ b/include/sys/param.h @@ -33,7 +33,9 @@ * Pre-processor Definitions ****************************************************************************/ +#define NBBY CHAR_BIT /* Number of bits in a byte */ #define MAXHOSTNAMELEN HOST_NAME_MAX +#define MAXNAMLEN NAME_MAX #define MAXPATHLEN PATH_MAX /* Macros for min/max. */
