commit: 7a5ea90f63bbe555800d36404d956a958673b59c Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org> AuthorDate: Sun Sep 13 15:57:17 2020 +0000 Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org> CommitDate: Sun Sep 13 15:59:02 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a5ea90f
media-radio/tlf: Fix failig test (bug #740298) Thanks ago for reporting Closes: https://bugs.gentoo.org/740298 Package-Manager: Portage-3.0.6, Repoman-3.0.1 Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org> media-radio/tlf/files/tlf-1.4.1-zone_nr.patch | 20 ++++++++++++++++++++ media-radio/tlf/tlf-1.4.1.ebuild | 2 ++ 2 files changed, 22 insertions(+) diff --git a/media-radio/tlf/files/tlf-1.4.1-zone_nr.patch b/media-radio/tlf/files/tlf-1.4.1-zone_nr.patch new file mode 100644 index 00000000000..cc5cf377592 --- /dev/null +++ b/media-radio/tlf/files/tlf-1.4.1-zone_nr.patch @@ -0,0 +1,20 @@ +diff --git a/src/zone_nr.c b/src/zone_nr.c +index c7e2a33..805bd4e 100644 +--- a/src/zone_nr.c ++++ b/src/zone_nr.c +@@ -20,11 +20,14 @@ + * get zone number + * + *--------------------------------------------------------------*/ +- ++#include "string.h" + + int zone_nr(char *comment) { + int z = 0; + ++ if (strlen(comment) < 2) ++ return z; ++ + if (comment[0] <= 57 && comment[0] >= 48) + z = (comment[0] - 48) * 10; + if (comment[1] <= 57 && comment[1] >= 48) diff --git a/media-radio/tlf/tlf-1.4.1.ebuild b/media-radio/tlf/tlf-1.4.1.ebuild index 23bc6b749b8..8da29357b28 100644 --- a/media-radio/tlf/tlf-1.4.1.ebuild +++ b/media-radio/tlf/tlf-1.4.1.ebuild @@ -25,6 +25,8 @@ DEPEND=" ${RDEPEND} test? ( dev-util/cmocka )" +PATCHES=( "${FILESDIR}"/${P}-zone_nr.patch ) + src_configure() { append-ldflags -L/usr/$(get_libdir)/hamlib econf --enable-fldigi-xmlrpc
