[PATCH] libssp: Include 'libstd.h' for using alloca(3) [PR116547]
As GCC now treating implicit declaration of function as an error instead of warning, compilation of libssp has been broken on some operating systems. The following error is from an x86_64-unknown-freebsd11 system: libssp/ssp.c: In function 'fail': libssp/ssp.c:134:17: error: implicit declaration of function 'alloca' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration^G-Wimplicit-function-declaration8;;^G] 134 | p = buf = alloca (len); | ^~ Most operating systems specifies that 'stdlib.h' should be included to get the declaration of alloca(3). 2024-08-31 WHR PR other/116547 * ssp.c: Include stdlib.h for alloca(3). fix-libssp-missing-include-libstd-h.diff Description: Binary data
[PATCH v2] libssp: Include 'libstd.h' for using alloca(3) [PR116547]
As GCC now treating implicit declaration of function as an error instead of warning, compilation of libssp has been broken on some operating systems. The following error is from an x86_64-unknown-freebsd11 system: libssp/ssp.c: In function 'fail': libssp/ssp.c:134:17: error: implicit declaration of function 'alloca' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration^G-Wimplicit-function-declaration8;;^G] 134 | p = buf = alloca (len); | ^~ Most operating systems specifies that 'stdlib.h' should be included to get the declaration of alloca(3). 2024-08-31 WHR PR other/116547 * ssp.c: Include stdlib.h for alloca(3). --- v2: Resend with correct MIME.--- a/libssp/ssp.c +++ b/libssp/ssp.c @@ -39,6 +39,9 @@ #ifdef HAVE_MALLOC_H # include #endif +#ifdef HAVE_STDLIB_H +# include +#endif #ifdef HAVE_STRING_H # include #endif
[PATCH v3] libssp: Include 'libstd.h' for using alloca(3) [PR116547]
As GCC now treating implicit declaration of function as an error instead of warning, compilation of libssp has been broken on some operating systems. The following error is from an x86_64-unknown-freebsd11 system: libssp/ssp.c: In function 'fail': libssp/ssp.c:134:17: error: implicit declaration of function 'alloca' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration^G-Wimplicit-function-declaration8;;^G] 134 | p = buf = alloca (len); | ^~ Most operating systems specifies that 'stdlib.h' should be included to get the declaration of alloca(3). 2024-08-31 WHR PR other/116547 * ssp.c: Include stdlib.h for alloca(3). --- v2: Resend with correct MIME. v3: Resend with text/plain.--- a/libssp/ssp.c +++ b/libssp/ssp.c @@ -39,6 +39,9 @@ #ifdef HAVE_MALLOC_H # include #endif +#ifdef HAVE_STDLIB_H +# include +#endif #ifdef HAVE_STRING_H # include #endif