From b94257e50b165975214e4b65d46a3218dd180a56 Mon Sep 17 00:00:00 2001 From: Bernhard Froehlich Date: Sat, 4 May 2013 14:59:52 +0200 Subject: [PATCH] stime(2) is only available on Linux so make it optional. --- src/tvhtime.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tvhtime.c b/src/tvhtime.c index e19d6c8d..589840af 100644 --- a/src/tvhtime.c +++ b/src/tvhtime.c @@ -99,7 +99,11 @@ tvhtime_update ( struct tm *tm ) if (tvhtime_update_enabled) { if (llabs(t2 - t1) > tvhtime_tolerance) { tvhlog(LOG_DEBUG, "time", "updated system clock"); +#ifdef stime stime(&now); +#else + tvhlog(LOG_NOTICE, "time", "stime(2) not implemented"); +#endif } }