summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2020-05-04 12:28:31 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2020-05-04 12:28:31 +0200
commit930c2cd2eb8947413e88404fa94c66e4e1db5ad6 (patch)
tree7716a98d79087b55c48d58db4969779332adbcb8 /eit.c
parent225c495632f4dbb9819e2b6b5d860cdf4c8127d1 (diff)
downloadvdr-930c2cd2eb8947413e88404fa94c66e4e1db5ad6.tar.gz
vdr-930c2cd2eb8947413e88404fa94c66e4e1db5ad6.tar.bz2
Fixed compatibility with current versions of glibc
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/eit.c b/eit.c
index 72a45e5c..d437b441 100644
--- a/eit.c
+++ b/eit.c
@@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
*
- * $Id: eit.c 4.7 2019/05/20 09:55:22 kls Exp $
+ * $Id: eit.c 4.8 2020/05/04 12:28:31 kls Exp $
*/
#include "eit.h"
@@ -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");