0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-01-20 07:35:26 +00:00
2020-02-04 23:14:28 +00:00

29 lines
768 B
Diff

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