Fix the following build failure with host gcc >= 14 which enables
-Werror=implicit-function-declaration
(https://gcc.gnu.org/gcc-14/porting_to.html):
configure:9998: checking build system compiler /usr/bin/gcc
configure:10011: /usr/bin/gcc conftest.c
conftest.c: In function 'main':
conftest.c:4:3: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
4 | exit(0);
| ^~~~
conftest.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | int
conftest.c:4:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
4 | exit(0);
| ^~~~
conftest.c:4:3: note: include '<stdlib.h>' or provide a declaration of 'exit'
configure:10014: $? = 1
configure:10021: result: no
configure:10026: error: Specified CC_FOR_BUILD doesn't seem to work
Fixes:
- http://autobuild.buildroot.org/results/3ab381f06d5dc030039b6f6f8d19feb55cf3367d
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 3bb426628c)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>