From 067a5c3415a1325f49d6150aaf97a068002e9957 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 1 May 2025 22:17:15 +0200 Subject: [PATCH] lrzsz: fix compilation with GCC14 Trying to compile with GCC14 will fail on compiler sanity check with: configure:1056:1: error: return type defaults to 'int' [-Wimplicit-int] 1056 | main(){return(0);} | ^~~~ This is due to GCC14 not allowing implicit integer types anymore[1]. So, patch configure to avoid this and make it compile with GCC14. Proper fix would be to use autoreconf to rebuild configure but configure.in is completely outdated and would likely be more broken when regenerated. [1] https://gcc.gnu.org/gcc-14/porting_to.html#implicit-int Signed-off-by: Robert Marko --- utils/lrzsz/patches/400-configure-gcc14.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 utils/lrzsz/patches/400-configure-gcc14.patch diff --git a/utils/lrzsz/patches/400-configure-gcc14.patch b/utils/lrzsz/patches/400-configure-gcc14.patch new file mode 100644 index 0000000000..76f228f19c --- /dev/null +++ b/utils/lrzsz/patches/400-configure-gcc14.patch @@ -0,0 +1,23 @@ +Trying to compile with GCC14 will fail on compiler sanity check with: +configure:1056:1: error: return type defaults to 'int' [-Wimplicit-int] + 1056 | main(){return(0);} + | ^~~~ + +This is due to GCC14 not allowing implicit integer types anymore[1]. + +So, patch configure to avoid this and make it compile with GCC14. + +[1] https://gcc.gnu.org/gcc-14/porting_to.html#implicit-int + +Signed-off-by: Robert Marko +--- a/configure ++++ b/configure +@@ -1053,7 +1053,7 @@ cat > conftest.$ac_ext << EOF + #line 1054 "configure" + #include "confdefs.h" + +-main(){return(0);} ++int main(){return(0);} + EOF + if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes