8 changed files with 134 additions and 84 deletions
@ -1,32 +0,0 @@ |
|||||
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,10 @@ int atsc_scan_date(time_t *rx_time, unsigned int to)
|
|
||||
*/ |
|
||||
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)) {
|
|
||||
perror("Unable to set time"); |
|
||||
return -1; |
|
||||
} |
|
||||
--
|
|
||||
2.24.1 |
|
||||
|
|
@ -0,0 +1,44 @@ |
|||||
|
From 9b8f1df41f7579da63c27763ff184d351e4c7fef Mon Sep 17 00:00:00 2001 |
||||
|
From: Simon Dawson <spdawson@gmail.com> |
||||
|
Date: Sun, 4 Jan 2015 12:06:18 +0100 |
||||
|
Subject: [PATCH] Fix compiler warning flags |
||||
|
|
||||
|
When building for bfin, the build fails as follows. |
||||
|
|
||||
|
cc1: error: unrecognized command line option "-Wno-packed-bitfield-compat" |
||||
|
|
||||
|
An example of an autobuild failure arising from this is the following. |
||||
|
|
||||
|
http://autobuild.buildroot.net/results/92e/92e472004812a3616f62d766a9ea07a997a66e89/ |
||||
|
http://autobuild.buildroot.net/results/6e7/6e7b48ad9768349d983985c3067c4267cde80541/ |
||||
|
|
||||
|
Clearly, not all toolchains provide a gcc that understands |
||||
|
the -Wno-packed-bitfield-compat flag; remove usage of this flag. |
||||
|
|
||||
|
Wno-packed-bitfield-compat option was added in gcc 4.4. |
||||
|
|
||||
|
[Romain: |
||||
|
- This patch is also needed for bfin toolchains which use gcc 4.3.5 |
||||
|
- Add a link to bfin build failure] |
||||
|
Signed-off-by: Simon Dawson <spdawson@gmail.com> |
||||
|
Signed-off-by: Romain Naour <romain.naour@openwide.fr> |
||||
|
---
|
||||
|
util/scan/Makefile | 2 +- |
||||
|
1 file changed, 1 insertion(+), 1 deletion(-) |
||||
|
|
||||
|
diff --git a/util/scan/Makefile b/util/scan/Makefile
|
||||
|
index d48c478..88667c5 100644
|
||||
|
--- a/util/scan/Makefile
|
||||
|
+++ b/util/scan/Makefile
|
||||
|
@@ -14,7 +14,7 @@ inst_bin = $(binaries)
|
||||
|
|
||||
|
removing = atsc_psip_section.c atsc_psip_section.h |
||||
|
|
||||
|
-CPPFLAGS += -Wno-packed-bitfield-compat -D__KERNEL_STRICT_NAMES
|
||||
|
+CPPFLAGS += -D__KERNEL_STRICT_NAMES
|
||||
|
|
||||
|
.PHONY: all |
||||
|
|
||||
|
--
|
||||
|
1.9.3 |
||||
|
|
@ -1,13 +0,0 @@ |
|||||
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 |
|
@ -0,0 +1,52 @@ |
|||||
|
# HG changeset patch |
||||
|
# User "Yann E. MORIN" <yann.morin.1998@free.fr> |
||||
|
# Date 1511772629 -3600 |
||||
|
# Mon Nov 27 09:50:29 2017 +0100 |
||||
|
# Branch yem/fixes |
||||
|
# Node ID 0848fa96c6eb13cf37249d317eff12cbd2f59ff7 |
||||
|
# Parent 3d43b280298c39a67d1d889e01e173f52c12da35 |
||||
|
utils: fix build with kernel headers >= 4.14 |
||||
|
|
||||
|
In kernel 4.14, CA_SET_PID was removed, in commit 833ff5e7feda (media: |
||||
|
ca.h: get rid of CA_SET_PID). |
||||
|
|
||||
|
Fix dst-util to not fail the build when this is missing. |
||||
|
|
||||
|
Fiuxes build failures such as: |
||||
|
http://autobuild.buildroot.org/results/708/708f11809b2cafc2a3375dc515803c87b376ed4d/build-end.log |
||||
|
http://autobuild.buildroot.org/results/e39/e3939d44376e92e8a35fb179d9890510334d8304/build-end.log |
||||
|
|
||||
|
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 @@
|
||||
|
return 0; |
||||
|
} |
||||
|
|
||||
|
+#if defined CA_SET_PID
|
||||
|
static int dst_set_pid(int cafd) |
||||
|
{ |
||||
|
if ((ioctl(cafd, CA_SET_PID)) < 0) { |
||||
|
@@ -120,6 +121,7 @@
|
||||
|
|
||||
|
return 0; |
||||
|
} |
||||
|
+#endif
|
||||
|
|
||||
|
static int dst_get_descr(int cafd) |
||||
|
{ |
||||
|
@@ -230,8 +232,12 @@
|
||||
|
dst_reset(cafd); |
||||
|
break; |
||||
|
case 'p': |
||||
|
+#if defined CA_SET_PID
|
||||
|
printf("%s: PID\n", __FUNCTION__); |
||||
|
dst_set_pid(cafd); |
||||
|
+#else
|
||||
|
+ printf("%s: PID not supported\n", __FUNCTION__);
|
||||
|
+#endif
|
||||
|
break; |
||||
|
case 'g': |
||||
|
printf("%s: Get Desc\n", __FUNCTION__); |
@ -1,24 +0,0 @@ |
|||||
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) { |
|
@ -0,0 +1,21 @@ |
|||||
|
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; |
||||
|
} |
Loading…
Reference in new issue