28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
|
From 930c2cd2eb8947413e88404fa94c66e4e1db5ad6 Mon Sep 17 00:00:00 2001
|
||
|
From: Klaus Schmidinger <vdr@tvdr.de>
|
||
|
Date: Mon, 4 May 2020 12:28:31 +0200
|
||
|
Subject: Fixed compatibility with current versions of glibc
|
||
|
|
||
|
[Retrieved (and updated to remove CONTRIBUTORS and HISTORY) from:
|
||
|
https://projects.vdr-developer.org/git/vdr.git/commit?id=930c2cd2eb8947413e88404fa94c66e4e1db5ad6]
|
||
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||
|
|
||
|
diff --git a/eit.c b/eit.c
|
||
|
index 72a45e5..d437b44 100644
|
||
|
--- a/eit.c
|
||
|
+++ b/eit.c
|
||
|
@@ -391,7 +391,9 @@ cTDT::cTDT(const u_char *Data)
|
||
|
if (abs(diff) > MAX_TIME_DIFF) {
|
||
|
mutex.Lock();
|
||
|
if (abs(diff) > MAX_ADJ_DIFF) {
|
||
|
- if (stime(&dvbtim) == 0)
|
||
|
+ timespec ts = { 0 };
|
||
|
+ ts.tv_sec = dvbtim;
|
||
|
+ if (clock_settime(CLOCK_REALTIME, &ts) == 0)
|
||
|
isyslog("system time changed from %s (%ld) to %s (%ld)", *TimeToString(loctim), loctim, *TimeToString(dvbtim), dvbtim);
|
||
|
else
|
||
|
esyslog("ERROR while setting system time: %m");
|
||
|
--
|
||
|
cgit v0.10.2
|
||
|
|