Replace obsolete stime() function with clock_settime()
bug 708802

Suggested-by: Manuel Reimer <manuel.reimer@gmx.de>
Signed-off-by: Joerg Bornkessel <hd_brummy@gentoo.org> ( 2020 Feb 24 )
diff -Naur vdr-2.2.0.orig/eit.c vdr-2.2.0/eit.c
--- vdr-2.2.0.orig/eit.c	2020-02-24 13:05:49.451790460 +0100
+++ vdr-2.2.0/eit.c	2020-02-24 13:07:00.719790460 +0100
@@ -343,7 +343,9 @@
   if (abs(diff) > MAX_TIME_DIFF) {
      mutex.Lock();
      if (abs(diff) > MAX_ADJ_DIFF) {
-        if (stime(&dvbtim) == 0)
+        timespec ts = {};
+        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");
