Browse Source

- dvb-apps: update patches

master
vanhofen 2 years ago
parent
commit
ce76dda98a
  1. 35
      package/dvb-apps/patches/0002-dvbdate-Remove-Obsoleted-stime-API-calls.patch
  2. 2
      package/dvb-apps/patches/0003-handle-static-shared-only-build.patch
  3. 13
      package/dvb-apps/patches/0005-libucsi-optimization-removal.patch
  4. 24
      package/dvb-apps/patches/0006-CA_SET_PID.patch
  5. 21
      package/dvb-apps/patches/0006-fix-glibc-2.31.patch
  6. 6
      package/dvb-apps/patches/0007-utils-fix-build-with-kernel-headers-4.14.patch
  7. 0
      package/dvb-apps/patches/0008-add-minimalized-output.patch
  8. 0
      package/dvb-apps/patches/0009-Fix-compiler-warning-flags.patch

35
package/dvb-apps/patches/0002-dvbdate-Remove-Obsoleted-stime-API-calls.patch

@ -0,0 +1,35 @@
From d6817dbaf407f65dd4af12c51736153fae8b217f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 21 Dec 2019 08:36:11 -0800
Subject: [PATCH] dvbdate: Remove Obsoleted stime API calls
stime() has been deprecated in glibc 2.31+ its recommended to
replaced with clock_settime()
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,14 @@
*/
int set_time(time_t * new_time)
{
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 31)
+ struct timespec s = {0};
+ s.tv_sec = new_time;
+
+ if (clock_settime(CLOCK_REALTIME, &s)) {
+#else
if (stime(new_time)) {
+#endif
perror("Unable to set time");
return -1;
}
--
2.24.1

2
package/dvb-apps/patches/0003-handle-static-shared-only-build.patch

@ -30,7 +30,7 @@ index 3410d7b..d274e16 100644
.PHONY: library
@@ -23,7 +29,7 @@ prerequisites = $(subst .o,.d,$(objects)) $(addsuffix .d,$(binaries))
@@ -23,7 +29,7 @@
.PHONY: clean install

13
package/dvb-apps/patches/0005-libucsi-optimization-removal.patch

@ -0,0 +1,13 @@
diff -r 3d43b280298c lib/libucsi/endianops.h
--- a/lib/libucsi/endianops.h Fri Mar 21 20:26:36 2014 +0100
+++ b/lib/libucsi/endianops.h Fri Jan 19 06:56:15 2018 +0000
@@ -33,6 +33,9 @@
#define __ucsi_packed __attribute__((packed))
+#if __GNUC__ >= 6 + (0 >= __GNUC_MINOR__)
+#pragma GCC optimize ("O1")
+#endif
#if __BYTE_ORDER == __BIG_ENDIAN

24
package/dvb-apps/patches/0006-CA_SET_PID.patch

@ -0,0 +1,24 @@
Index: dvb-apps/util/dst-utils/dst_test.c
===================================================================
--- dvb-apps.orig/util/dst-utils/dst_test.c
+++ dvb-apps/util/dst-utils/dst_test.c
@@ -35,7 +35,18 @@
#include <libdvben50221/en50221_app_tags.h>
#define CA_NODE "/dev/dvb/adapter0/ca0"
-
+/*
+ Quick hack around the removal of ca_pid_t and CA_GET_PID in recent kernels
+ https://github.com/torvalds/linux/commit/833ff5e7feda1a042b83e82208cef3d212ca0ef1
+*/
+#ifndef CA_SET_PID
+typedef struct ca_pid {
+ unsigned int pid;
+ int index; /* -1 == disable*/
+} ca_pid_t;
+/* We should not be able to get it so a number that is unlikely to happen */
+#define CA_SET_PID 42424242
+#endif
static int dst_comms(int cafd, uint32_t tag, uint32_t function, struct ca_msg *msg)
{
if (tag) {

21
package/dvb-apps/patches/0006-fix-glibc-2.31.patch

@ -1,21 +0,0 @@
dvbdate: fix compilation error with glibc 2.31
as stime func doesn't exists anymore in newer versions of glibc >= 2.31 due
to obseletion, a replacment with clock_settime is inorder to fix the issue.
Signed-off-by: Dagg Stompler <daggs@gmx.com>
--- a/util/dvbdate/dvbdate.c
+++ b/util/dvbdate/dvbdate.c
@@ -309,7 +309,10 @@
*/
int set_time(time_t * new_time)
{
- if (stime(new_time)) {
+ struct timespec s = {0};
+ s.tv_sec = new_time;
+
+ if (clock_settime(CLOCK_REALTIME, &s)) {
perror("Unable to set time");
return -1;
}

6
package/dvb-apps/patches/0005-utils-fix-build-with-kernel-headers-4.14.patch → package/dvb-apps/patches/0007-utils-fix-build-with-kernel-headers-4.14.patch

@ -21,7 +21,7 @@ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
diff --git a/util/dst-utils/dst_test.c b/util/dst-utils/dst_test.c
--- a/util/dst-utils/dst_test.c
+++ b/util/dst-utils/dst_test.c
@@ -111,6 +111,7 @@
@@ -122,6 +122,7 @@
return 0;
}
@ -29,7 +29,7 @@ diff --git a/util/dst-utils/dst_test.c b/util/dst-utils/dst_test.c
static int dst_set_pid(int cafd)
{
if ((ioctl(cafd, CA_SET_PID)) < 0) {
@@ -120,6 +121,7 @@
@@ -131,6 +132,7 @@
return 0;
}
@ -37,7 +37,7 @@ diff --git a/util/dst-utils/dst_test.c b/util/dst-utils/dst_test.c
static int dst_get_descr(int cafd)
{
@@ -230,8 +232,12 @@
@@ -241,8 +243,12 @@
dst_reset(cafd);
break;
case 'p':

0
package/dvb-apps/patches/0007-add-minimalized-output.patch → package/dvb-apps/patches/0008-add-minimalized-output.patch

0
package/dvb-apps/patches/0002-Fix-compiler-warning-flags.patch → package/dvb-apps/patches/0009-Fix-compiler-warning-flags.patch

Loading…
Cancel
Save