Files
RedBear-OS/recipes
vasilito 393fa47cfe argp-standalone: include <alloca.h> under GCC (GCC 14+ / C23)
argp-parse.c and argp-help.c wrap the whole alloca-declaration block in
'#ifndef __GNUC__', so the header is never included when building with
GCC -- the code relied on GCC historically providing an implicit
declaration. GCC 14 promoted -Wimplicit-function-declaration to an error
and C23 removed implicit declarations, so the GCC 16 cross toolchain
fails:

  argp-parse.c:1227:36: error: implicit declaration of function 'alloca'
  argp-help.c:1329:35: error: implicit declaration of function 'alloca'

configure already sets HAVE_ALLOCA_H 1 and relibc's <alloca.h> defines
alloca(size) as __builtin_alloca(size), which is what GCC wants. Honour
HAVE_ALLOCA_H before consulting __GNUC__; non-GCC paths are untouched.

Patch generated by diff against pristine source, applies at --fuzz=0,
and the recipe cooks clean. Second opportunistic C23-era fix under the
gnu17 migration, after libiconv.
2026-08-03 14:17:59 +03:00
..