[oe-commits] [meta-openembedded] 08/10: dvb-apps: Replace stime with clock_settime

git at git.openembedded.org git at git.openembedded.org
Mon Dec 23 23:07:39 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit c49c6b2970e7de45c25a701c8322cb68d163aed3
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sat Dec 21 12:10:57 2019 -0800

    dvb-apps: Replace stime with clock_settime
    
    Newer glibc 2.31+ removed stime.
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../recipes-multimedia/dvb-apps/dvb-apps_1.1.1.bb  |  1 +
 ...-dvbdate-Remove-Obsoleted-stime-API-calls.patch | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.bb b/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.bb
index 3f49118..f354ef3 100644
--- a/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.bb
+++ b/meta-multimedia/recipes-multimedia/dvb-apps/dvb-apps_1.1.1.bb
@@ -11,6 +11,7 @@ SRC_URI = "hg://linuxtv.org/hg;module=dvb-apps;protocol=http \
           file://0004-Makefile-remove-test.patch \
           file://0005-libucsi-optimization-removal.patch \
           file://0006-CA_SET_PID.patch \
+          file://0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch \
           "
 
 S = "${WORKDIR}/${BPN}"
diff --git a/meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch b/meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch
new file mode 100644
index 0000000..9035b56
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/dvb-apps/files/0001-dvbdate-Remove-Obsoleted-stime-API-calls.patch
@@ -0,0 +1,32 @@
+From d6817dbaf407f65dd4af12c51736153fae8b217f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at 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 at 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
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list