diff --git a/lrzsz-socklen.patch b/lrzsz-socklen.patch new file mode 100644 index 0000000..a597b78 --- /dev/null +++ b/lrzsz-socklen.patch @@ -0,0 +1,26 @@ +Use socklen_t as the length of the socket address (which is a bit of +an anachronism, considering the rest of the sources). The previous +code des not work on 64-bit big-endian architectures. + +diff --git a/src/tcp.c b/src/tcp.c +index 137f94c37503abe9..69da8c9f8dff304b 100644 +--- a/src/tcp.c ++++ b/src/tcp.c +@@ -56,7 +56,7 @@ tcp_server (char *buf) + struct sockaddr_in s; + struct sockaddr_in t; + int on=1; +- size_t len; ++ socklen_t len; + + if ((sock = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { + error(1,errno,"socket"); +@@ -91,7 +91,7 @@ tcp_accept (int d) + { + int so; + struct sockaddr_in s; +- size_t namelen; ++ socklen_t namelen; + int num=0; + + namelen = sizeof(s); diff --git a/lrzsz.spec b/lrzsz.spec index a87f76e..015f06e 100644 --- a/lrzsz.spec +++ b/lrzsz.spec @@ -1,7 +1,7 @@ Summary: The lrz and lsz modem communications programs Name: lrzsz Version: 0.12.20 -Release: 61%{?dist} +Release: 62%{?dist} License: GPL-2.0-or-later AND GPL-2.0-only Source: http://www.ohse.de/uwe/releases/%{name}-%{version}.tar.gz Patch1: lrzsz-0.12.20-glibc21.patch @@ -10,6 +10,7 @@ Patch3: lrzsz-0.12.20-man.patch Patch4: lrzsz-0.12.20-aarch64.patch Patch5: lrzsz-configure-c99.patch Patch6: lrzsz-c99.patch +Patch7: lrzsz-socklen.patch Url: http://www.ohse.de/uwe/software/lrzsz.html BuildRequires: gcc gettext BuildRequires: make @@ -29,6 +30,7 @@ copylefted Zmodem solution for Linux systems. %patch4 -p1 -b .aarch64 %patch5 -p1 %patch6 -p1 +%patch7 -p1 rm -f po/*.gmo @@ -53,6 +55,9 @@ for m in sb sx; do ln -s sz.1 %{buildroot}%{_mandir}/man1/$m.1; done %{_mandir}/*/* %changelog +* Mon Dec 18 2023 Florian Weimer - 0.12.20-62 +- Fix socket length incompatibility (C compatibility issue) + * Tue Oct 31 2023 Tomas Korbar - 0.12.20-61 - Add additional SPDX licenses found by scancode tool