dvb-apps: Use tarball for SRC_URI and fix build on musl

Convert to using tarball for SRC_URI, this is only recipe in
meta-openembedded needing mercurial fetcher

Fix the stime replacement patch to fix type errors on time_t

| dvbdate.c:313:12: error: incompatible pointer to integer conversion assigning to 'time_t' (aka 'long') from 'time_t **' (aka 'long **') [-Wint-conversion]
|         ts.tv_sec = &new_time;
|                   ^ ~~~~~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2022-08-27 11:10:29 -07:00
parent b81f66a09a
commit 3dd74712ed
2 changed files with 8 additions and 14 deletions

View File

@ -2,9 +2,8 @@ SUMMARY = "Linux DVB API applications and utilities"
HOMEPAGE = "http://www.linuxtv.org"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
SRCREV = "3d43b280298c39a67d1d889e01e173f52c12da35"
SRC_URI = "hg://linuxtv.org/hg;module=dvb-apps;protocol=http \
SRC_URI = "https://www.linuxtv.org/hg/dvb-apps/archive/3d43b280298c.tar.bz2;downloadfilename=${BPN}-3d43b280298c.tar.bz2 \
file://dvb-scan-table \
file://0001-Fix-generate-keynames.patch \
file://0003-handle-static-shared-only-build.patch \
@ -13,8 +12,8 @@ SRC_URI = "hg://linuxtv.org/hg;module=dvb-apps;protocol=http \
file://0006-CA_SET_PID.patch \
file://0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch \
"
S = "${WORKDIR}/${BPN}"
SRC_URI[sha256sum] = "f39e2f0ebed7e32bce83522062ad4d414f67fccd5df1b647618524497e15e057"
S = "${WORKDIR}/${BPN}-3d43b280298c"
inherit perlnative

View File

@ -11,22 +11,17 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
util/dvbdate/dvbdate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/util/dvbdate/dvbdate.c b/util/dvbdate/dvbdate.c
index f0df437..492ed79 100644
--- a/util/dvbdate/dvbdate.c
+++ b/util/dvbdate/dvbdate.c
@@ -309,7 +309,10 @@ int atsc_scan_date(time_t *rx_time, unsigned int to)
@@ -309,7 +309,10 @@ int atsc_scan_date(time_t *rx_time, unsi
*/
int set_time(time_t * new_time)
{
- if (stime(new_time)) {
+ struct timespec ts;
+ ts.tv_sec = &new_time;
+ ts.tv_nsec = 0;
+ if (clock_settime(CLOCK_REALTIME, &ts)) {
+ struct timespec s = {0};
+ s.tv_sec = *new_time;
+
+ if (clock_settime(CLOCK_REALTIME, &s)) {
perror("Unable to set time");
return -1;
}
--
2.24.1