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 da8dba1252167525e2ce550e7472fc7fcc286e46 Author: Marco Casaroli <[email protected]> AuthorDate: Tue Oct 27 19:54:28 2026 +0100 include/stdlib.h: Include <alloca.h>. glibc and the BSDs declare alloca() in <stdlib.h> too (glibc's <stdlib.h> includes <alloca.h>), and programs call it with only <stdlib.h>. With NuttX they got an implicit declaration, which newer compilers reject (acl's libacl). <string.h> already includes <alloca.h>; do the same in <stdlib.h>. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- include/stdlib.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/stdlib.h b/include/stdlib.h index 92ffb7a9161..ffc2469d99f 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -34,6 +34,12 @@ #include <stdint.h> #include <limits.h> +/* alloca() is also visible with <stdlib.h>, as in glibc and the BSDs: + * programs use it with only <stdlib.h>. + */ + +#include <alloca.h> + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/
