summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Beierlein <tomjbe@gentoo.org>2020-09-13 17:57:17 +0200
committerThomas Beierlein <tomjbe@gentoo.org>2020-09-13 17:59:02 +0200
commit7a5ea90f63bbe555800d36404d956a958673b59c (patch)
tree03e3760b978f40ebd254af8173f7b584ebb57f8f /media-radio/tlf
parentdev-python/clint: support pypy3+Py3.9 (diff)
downloadgentoo-7a5ea90f63bbe555800d36404d956a958673b59c.tar.gz
gentoo-7a5ea90f63bbe555800d36404d956a958673b59c.tar.bz2
gentoo-7a5ea90f63bbe555800d36404d956a958673b59c.zip
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@gentoo.org>
Diffstat (limited to 'media-radio/tlf')
-rw-r--r--media-radio/tlf/files/tlf-1.4.1-zone_nr.patch20
-rw-r--r--media-radio/tlf/tlf-1.4.1.ebuild2
2 files changed, 22 insertions, 0 deletions
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 000000000000..cc5cf3775920
--- /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 23bc6b749b8e..8da29357b285 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