diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index 42b54674c..4554fdfac 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -1002,7 +1002,18 @@ void CControlAPI::rc_sync(int fd) { struct input_event ev; - gettimeofday(&ev.time, NULL); +// Check if input_event_sec macro is defined +#ifdef input_event_sec + // Use input_event_sec and input_event_usec macros if they are defined + struct timeval tv; + gettimeofday(&tv, NULL); + ev.input_event_sec = tv.tv_sec; + ev.input_event_usec = tv.tv_usec; +#else + // Fallback for older versions that use timeval directly + gettimeofday(&ev.time, NULL); +#endif + ev.type = EV_SYN; ev.code = SYN_REPORT; ev.value = 0; @@ -1804,6 +1815,7 @@ std::string CControlAPI::channelEPGformated(CyhookHandler *hh, int bouquetnr, t_ return result; } + //----------------------------------------------------------------------------- // Detailed EPG list in XML or JSON //-----------------------------------------------------------------------------