mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 23:47:49 +00:00
dvb-apps: fix glibc-2.31 incompatability
This commit is contained in:
parent
9b350e50b7
commit
0e41a4cad8
@ -0,0 +1,28 @@
|
|||||||
|
From 6e62b334cced721b0b2bed197fd36e44878580ce Mon Sep 17 00:00:00 2001
|
||||||
|
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||||
|
Date: Mon, 3 Feb 2020 23:30:43 +0000
|
||||||
|
Subject: [PATCH] replace obsolete stime after glibc-2.31
|
||||||
|
|
||||||
|
---
|
||||||
|
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..bff7204 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) < 0) {
|
||||||
|
perror("Unable to set time");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user