Skip to content

Commit

Permalink
package/lrzsz: fix FTBFS by upgrading and applying Debian fix
Browse files Browse the repository at this point in the history
This failure appeared when trying to build lrzsz:

lsyslog.c:73:5: error: implicit declaration of function ‘vasprintf’; did you mean ‘vsprintf’? [-Wimplicit-function-declaration]

To fix the problem, let's follow Debian. Switch to 0.12.21rc (which is
already out there 25 years!) and import their patch adding includes.

Signed-off-by: Wolfram Sang <[email protected]>
[Peter: add Upstream tag to patch]
Signed-off-by: Peter Korsgaard <[email protected]>
  • Loading branch information
Wolfram Sang authored and jacmet committed Dec 1, 2024
1 parent 47c5ac2 commit 58ff0cb
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 10 deletions.
16 changes: 9 additions & 7 deletions package/lrzsz/0001-configure-fix-main-prototype.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 43b2b711fedd3a28d497b3a5c0e9054fa203ef3d Mon Sep 17 00:00:00 2001
From c2758812867a52a6bb56b87d52c35ebff797e777 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <[email protected]>
Date: Sun, 15 Sep 2024 15:12:07 +0200
Subject: [PATCH] configure: fix main() prototype
Expand All @@ -10,23 +10,25 @@ configure script directly.

Signed-off-by: Thomas Petazzoni <[email protected]>
Upstream: N/A, patching generated file
[wsa: rebased to 0.12.21rc]
Signed-off-by: Wolfram Sang <[email protected]>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index db26726..d160e27 100755
index cc586d5..16a259a 100755
--- a/configure
+++ b/configure
@@ -1008,7 +1008,7 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 1010 "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:1014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
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
--
2.46.0
2.45.2

124 changes: 124 additions & 0 deletions package/lrzsz/0004-FTBFS-fix-missing-includes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
From a9faaf7f02811e7409074362700e963609885ba6 Mon Sep 17 00:00:00 2001
From: Wolfram Sang <[email protected]>
Date: Fri, 29 Nov 2024 14:14:25 +0100
Subject: [PATCH] FTBFS fix missing includes

From: https://sources.debian.org/data/main/l/lrzsz/0.12.21rc-0.1/debian/patches/include.diff

Description: Fixes FTBFS (missing includes)
Author: Martin A. Godisch <[email protected]>
Bug-Debian: https://bugs.debian.org/1066514
Forwarded: no

Signed-off-by: Wolfram Sang <[email protected]>
Upstream: https://sources.debian.org/data/main/l/lrzsz/0.12.21rc-0.1/debian/patches/include.diff
---
lib/error.c | 1 +
src/canit.c | 1 +
src/lrz.c | 1 +
src/lsyslog.c | 1 +
src/lsz.c | 1 +
src/tcp.c | 1 +
src/zperr.c | 1 +
src/zreadline.c | 1 +
8 files changed, 8 insertions(+)

diff --git a/lib/error.c b/lib/error.c
index 8b96b91..3861578 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif

#include <stdio.h>
+#include <string.h>

#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC || defined(__cplusplus)
# if __STDC__ || defined(__cplusplus)
diff --git a/src/canit.c b/src/canit.c
index f947a25..ae91807 100644
--- a/src/canit.c
+++ b/src/canit.c
@@ -24,6 +24,7 @@
#define SS_NORMAL 0
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <signal.h>
#include <setjmp.h>
#include <ctype.h>
diff --git a/src/lrz.c b/src/lrz.c
index 2f6a5ad..63e1326 100644
--- a/src/lrz.c
+++ b/src/lrz.c
@@ -27,6 +27,7 @@
#define SS_NORMAL 0
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <signal.h>
#include <ctype.h>
#include <errno.h>
diff --git a/src/lsyslog.c b/src/lsyslog.c
index d21ab35..24d8cd1 100644
--- a/src/lsyslog.c
+++ b/src/lsyslog.c
@@ -18,6 +18,7 @@
02111-1307, USA.

*/
+#define _GNU_SOURCE
#include "config.h"
#ifdef ENABLE_SYSLOG
#include "zglobal.h"
diff --git a/src/lsz.c b/src/lsz.c
index b9d2545..1598150 100644
--- a/src/lsz.c
+++ b/src/lsz.c
@@ -28,6 +28,7 @@
#define SS_NORMAL 0
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <signal.h>
#include <setjmp.h>
#include <ctype.h>
diff --git a/src/tcp.c b/src/tcp.c
index 7e1ba3f..cdf9187 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -33,6 +33,7 @@
#include <ctype.h>
#include <stdio.h>
#include <signal.h>
+#include <string.h>

#include "zglobal.h"
#include <stdlib.h>
diff --git a/src/zperr.c b/src/zperr.c
index 31963de..0b9dc29 100644
--- a/src/zperr.c
+++ b/src/zperr.c
@@ -22,6 +22,7 @@
#include "zglobal.h"
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <errno.h>

#ifdef __STDC__
diff --git a/src/zreadline.c b/src/zreadline.c
index dd9736b..7bc3736 100644
--- a/src/zreadline.c
+++ b/src/zreadline.c
@@ -27,6 +27,7 @@

#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <signal.h>
#include <ctype.h>
#include <errno.h>
--
2.45.2

2 changes: 1 addition & 1 deletion package/lrzsz/lrzsz.hash
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Locally calculated
sha256 c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1 lrzsz-0.12.20.tar.gz
sha256 4d845f239ddcd86735b5dbf01f3869b072ffb6f6c8aa24c346dc4a3c95453c55 lrzsz-0.12.21rc.tar.gz
sha256 dcc100d4161cc0b7177545ab6e47216f84857cda3843847c792a25289852dcaa COPYING
4 changes: 2 additions & 2 deletions package/lrzsz/lrzsz.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#
################################################################################

LRZSZ_VERSION = 0.12.20
LRZSZ_SITE = http://www.ohse.de/uwe/releases
LRZSZ_VERSION = 0.12.21rc
LRZSZ_SITE = http://www.ohse.de/uwe/testing
LRZSZ_CONF_OPTS = --disable-timesync
LRZSZ_LICENSE = GPL-2.0+
LRZSZ_LICENSE_FILES = COPYING
Expand Down

0 comments on commit 58ff0cb

Please sign in to comment.