diff --git a/package/lrzsz/0001-configure-fix-main-prototype.patch b/package/lrzsz/0001-configure-fix-main-prototype.patch new file mode 100644 index 0000000000..46b7aade00 --- /dev/null +++ b/package/lrzsz/0001-configure-fix-main-prototype.patch @@ -0,0 +1,32 @@ +From 43b2b711fedd3a28d497b3a5c0e9054fa203ef3d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 15 Sep 2024 15:12:07 +0200 +Subject: [PATCH] configure: fix main() prototype + +The pre-generated configure script has a check that doesn't work with +GCC >= 14.x due to a partial main() prototype. Doing AUTORECONF = YES +doesn't work as the configure.in is very old, so let's fix the +configure script directly. + +Signed-off-by: Thomas Petazzoni +Upstream: N/A, patching generated file +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index db26726..d160e27 100755 +--- a/configure ++++ b/configure +@@ -1008,7 +1008,7 @@ cross_compiling=$ac_cv_prog_cc_cross + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes +-- +2.46.0 + diff --git a/package/lrzsz/0002-lib-long-options.c-include-stdlib.h.patch b/package/lrzsz/0002-lib-long-options.c-include-stdlib.h.patch new file mode 100644 index 0000000000..6229114e0a --- /dev/null +++ b/package/lrzsz/0002-lib-long-options.c-include-stdlib.h.patch @@ -0,0 +1,44 @@ +From aa6779c2846f13bf58575486b374ef06b2844fe8 Mon Sep 17 00:00:00 2001 +From: Yegor Yefremov +Date: Tue, 21 May 2024 11:13:17 +0200 +Subject: [PATCH] lib/long-options.c: include stdlib.h +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes the following error (compiled with GCC 14.x): + +long-options.c:70:11: error: implicit declaration of function ‘exit’ +[-Wimplicit-function-declaration] + 70 | exit (0); + | ^~~~ + +Upstream: https://github.com/UweOhse/lrzsz/pull/4 +Signed-off-by: Thomas Petazzoni +--- + lib/long-options.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/lib/long-options.c b/lib/long-options.c +index 76b9796..19c84e0 100644 +--- a/lib/long-options.c ++++ b/lib/long-options.c +@@ -22,6 +22,15 @@ + #endif + + #include ++ ++/* This needs to come after some library #include ++ to get __GNU_LIBRARY__ defined. */ ++#ifdef __GNU_LIBRARY__ ++/* Don't include stdlib.h for non-GNU C libraries because some of them ++ contain conflicting prototypes for getopt. */ ++#include ++#endif /* GNU C library. */ ++ + #include + #include "long-options.h" + +-- +2.46.0 + diff --git a/package/lrzsz/0003-include-stdio.h-to-remove-warning.patch b/package/lrzsz/0003-include-stdio.h-to-remove-warning.patch new file mode 100644 index 0000000000..e4a958cdfa --- /dev/null +++ b/package/lrzsz/0003-include-stdio.h-to-remove-warning.patch @@ -0,0 +1,26 @@ +From e164c9cd3207321e162f054357fcd37b06cb0b8a Mon Sep 17 00:00:00 2001 +From: Uwe Ohse +Date: Mon, 2 Mar 2020 22:38:16 +0000 +Subject: [PATCH] include stdio.h to remove warning + +Upstream: https://github.com/UweOhse/lrzsz/commit/937a2ff696fb600672eb0e8fab87f75d5e4fbc25 +Signed-off-by: Thomas Petazzoni +--- + src/lsyslog.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lsyslog.c b/src/lsyslog.c +index 6baf4a2..d21ab35 100644 +--- a/src/lsyslog.c ++++ b/src/lsyslog.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + #endif + + #if __STDC__ +-- +2.46.0 +