diff --git a/lib/App/mojo/mojoKernel.cpp b/lib/App/mojo/mojoKernel.cpp index e2cde229..717bd257 100644 --- a/lib/App/mojo/mojoKernel.cpp +++ b/lib/App/mojo/mojoKernel.cpp @@ -242,12 +242,23 @@ void mojoKernel::m_fThreadProc( void ){ case CMD_KRNL_SYNC_TIME:{ uint32_t uts = atoi( tCMD->PARAM ); if( uts ){ +#if ( __GLIBC__ < 3 ) && ( __GLIBC_MINOR__ < 31 ) time_t ts = (time_t)uts; if( stime( &ts ) == 0 ){ // Restert Server; m_bThreadStatus = TH_ENDED; setExitCause( EXIT_CODE_KERNEL_CLEAR ); }; +#else + timespec ts; + ts.tv_sec = (time_t)uts; + ts.tv_nsec = 0; + if( clock_settime( CLOCK_REALTIME, &ts ) == 0 ){ + // Restert Server; + m_bThreadStatus = TH_ENDED; + setExitCause( EXIT_CODE_KERNEL_CLEAR ); + }; +#endif }; break; };