From: Matteo Croce <[email protected]>
Newest compilers complains if main() is declared without a return value,
this makes the test for ncurses-devel fail:
<stdin>:2:1: error: return type defaults to ‘int’ [-Wimplicit-int]
Which propagates as:
HOSTLD scripts/kconfig/lxdialog/lxdialog
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
Let main() return an int to fix the build.
Signed-off-by: Matteo Croce <[email protected]>
---
scripts/kconfig/lxdialog/check-lxdialog.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh
b/scripts/kconfig/lxdialog/check-lxdialog.sh
index 5075ebf2d..890ff21d4 100755
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -47,7 +47,7 @@ trap "rm -f $tmp" 0 1 2 3 15
check() {
$cc -x c - -o $tmp 2>/dev/null <<'EOF'
#include CURSES_LOC
-main() {}
+int main() { return 0 ; }
EOF
if [ $? != 0 ]; then
echo " *** Unable to find the ncurses libraries or the" 1>&2
--
2.45.2
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox