t2scan: update to githash ae1c768

This commit is contained in:
Rudi Heitbaum 2025-03-22 11:00:34 +00:00
parent 30f19da2ec
commit 50de4b1c8b
3 changed files with 3 additions and 191 deletions

View File

@ -2,11 +2,11 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="t2scan"
PKG_VERSION="0.7"
PKG_SHA256="44e4b738a2beed8eb964be3d90b6da48c2d1c672d81fd8db8bbda87bcc433fcb"
PKG_VERSION="ae1c768d8ff08400f8409e9e9338d375b78731c1"
PKG_SHA256="7a04aaabff34c83bac683e50e27494467ff1865829d2f95445a17228fe4b77c6"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/mighty-p/t2scan"
PKG_URL="https://github.com/mighty-p/t2scan/archive/v${PKG_VERSION}.tar.gz"
PKG_URL="https://github.com/mighty-p/t2scan/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="A small channel scan tool which generates DVB-T/T2 channels.conf files."
PKG_BUILD_FLAGS="-sysroot -cfg-libs"

View File

@ -1,104 +0,0 @@
From 40f5e11bf9977f5daf48c15a899d17814557fc5b Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Tue, 7 May 2024 17:34:47 +1000
Subject: [PATCH 1/3] fix building with gcc-14.1
../countries.c: In function 'choose_country':
../countries.c:121:84: error: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
121 | plplist[0] = -1; plplist[1] = 1; plplist[2] = 0; plplist_length = 3;
|
---
countries.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/countries.c b/countries.c
index b61d86d..6295cd5 100644
--- a/countries.c
+++ b/countries.c
@@ -118,7 +118,8 @@ int choose_country (const char * country,
case AT: // AUSTRIA
case IT: // ITALY
- plplist[0] = -1; plplist[1] = 1; plplist[2] = 0; plplist_length = 3;
+ plplist[0] = -1; plplist[1] = 1; plplist[2] = 0;
+ *plplist_length = 3;
case BE: // BELGIUM
case CH: // SWITZERLAND
case CO: // COLOMBIA, DVB-C + DVB-T2
From b3e1a2b588134f3c546ba0e9a15511da38a8fdc6 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Tue, 7 May 2024 17:40:25 +1000
Subject: [PATCH 2/3] fix calloc warnings
warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
---
parse-dvbscan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/parse-dvbscan.c b/parse-dvbscan.c
index 72f1cb8..11950b9 100644
--- a/parse-dvbscan.c
+++ b/parse-dvbscan.c
@@ -128,7 +128,7 @@ void parse_t2scan_flags(const char * input_buffer, struct t2scan_flags * flags)
int dvbscan_parse_tuningdata(const char * tuningdata, struct t2scan_flags * flags) {
FILE * initdata = NULL;
- char * buf = (char *) calloc(sizeof(char), MAX_LINE_LENGTH);
+ char * buf = (char *) calloc(MAX_LINE_LENGTH, sizeof(char));
enum __dvbscan_args arg;
struct transponder * tn;
int count = 0;
@@ -147,7 +147,7 @@ int dvbscan_parse_tuningdata(const char * tuningdata, struct t2scan_flags * flag
}
while (fgets(buf, MAX_LINE_LENGTH, initdata) != NULL) {
- char * copy = (char *) calloc(sizeof(char), strlen(buf) + 1);
+ char * copy = (char *) calloc(strlen(buf) + 1, sizeof(char));
char * token;
if (copy == NULL) {
From d5071e9fdb3f14194f72ead51d1353b6c05caa80 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Wed, 8 May 2024 08:19:11 +1000
Subject: [PATCH 3/3] fix building with gcc-14.1
fixes:
../scan.c: In function 'network_scan':
../scan.c:2413:29: error: assignment to 'int *' from incompatible pointer type 'int (*)[256]' [-Wincompatible-pointer-types]
2413 | my_plplist = &plplist;
| ^
../scan.c:2417:29: error: assignment to 'int *' from incompatible pointer type 'int (*)[256]' [-Wincompatible-pointer-types]
2417 | my_plplist = &user_plplist;
| ^
../scan.c:2420:29: error: assignment to 'int *' from incompatible pointer type 'int (*)[256]' [-Wincompatible-pointer-types]
2420 | my_plplist = &plplist;
| ^
---
scan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scan.c b/scan.c
index 17fdb3c..5341a1a 100644
--- a/scan.c
+++ b/scan.c
@@ -2410,14 +2410,14 @@ static void network_scan(int frontend_fd, int tuning_data) {
// plp loop
if (delsys == SYS_DVBT2 && (!multistream)) {
// multistream is not supported, so use plp id -1 ("autodetection") as only value to scan
- my_plplist = &plplist;
+ my_plplist = plplist;
my_plplist[0] = -1;
my_plplist_length = 1;
} else if (delsys == SYS_DVBT2 && use_user_plplist) {
- my_plplist = &user_plplist;
+ my_plplist = user_plplist;
my_plplist_length = user_plplist_length;
} else if (delsys == SYS_DVBT2) {
- my_plplist = &plplist;
+ my_plplist = plplist;
my_plplist_length = plplist_length;
} else {
// for legacy DVB-T (or ATSC) there is nothing such as PLPs

View File

@ -1,84 +0,0 @@
From 3c08ff330853ed8ebac35d0905fa64134e9ca489 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Sun, 8 Dec 2024 11:51:12 +0000
Subject: [PATCH] t2scan: fix -std=c23 build failure
gcc-15 switched to -std=c23 by default:
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212
As a result `t2scan` fails the build so only typedef int bool
for __STDC_VERSION__ <= 201710L (C17)
../tools.h:35:15: error: two or more data types in declaration specifiers
35 | typedef int bool;
| ^~~~
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
char-coding.h | 2 +-
emulate.c | 2 +-
emulate.h | 2 +-
tools.h | 10 ++++++----
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/char-coding.h b/char-coding.h
index 15bcdf9..93c78d2 100644
--- a/char-coding.h
+++ b/char-coding.h
@@ -31,7 +31,7 @@ int get_codepage_index(const char * codepage);
/*
* set the default charset that is used if a string does not include a charset definition in the first byte
*/
-void set_char_coding_default_charset();
+void set_char_coding_default_charset(char *);
/*
* reset default charset to the reset_to_charset
diff --git a/emulate.c b/emulate.c
index d0cd744..cfe7ebe 100644
--- a/emulate.c
+++ b/emulate.c
@@ -199,7 +199,7 @@ int em_getproperty(struct dtv_properties * cmdseq) {
}
-void em_lnb(int high_band, uint32_t high_val, uint32_t low_val) {
+void em_lnb(_Bool high_band, uint32_t high_val, uint32_t low_val) {
em_device.highband = high_band;
em_device.lnb_low = low_val;
em_device.lnb_high = high_val;
diff --git a/emulate.h b/emulate.h
index fe3d6bf..392b817 100644
--- a/emulate.h
+++ b/emulate.h
@@ -17,7 +17,7 @@ void em_dvbapi(uint16_t * flags);
int em_setproperty(struct dtv_properties * cmdseq);
int em_getproperty(struct dtv_properties * cmdseq);
int em_status(fe_status_t * status);
-void em_lnb(bool high_band, uint32_t high_val, uint32_t low_val);
+void em_lnb(_Bool high_band, uint32_t high_val, uint32_t low_val);
void em_polarization(uint8_t p);
//--------------------------------------------------
diff --git a/tools.h b/tools.h
index 20b6a0d..221580e 100644
--- a/tools.h
+++ b/tools.h
@@ -31,10 +31,12 @@
/*******************************************************************************
/* common typedefs && logging.
******************************************************************************/
-#ifndef bool
- typedef int bool;
- #define false 0
- #define true !(false)
+#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ <= 201710L
+ #ifndef bool
+ typedef int bool;
+ #define false 0
+ #define true !(false)
+ #endif
#endif
#define min(a,b) (b<a?b:a)