privops: switch from settimeofday() to clock_settime()

Following the removal of gettimeofday() calls, change PRV_SetTime() to
use clock_settime() instead of settimeofday(). Only CLOCK_REALTIME is
supported for now.
This commit is contained in:
Miroslav Lichvar
2026-01-29 09:29:30 +01:00
parent c51c7f5a81
commit e313f5abf7
5 changed files with 16 additions and 19 deletions

View File

@@ -41,9 +41,9 @@ int PRV_AdjustTimex(struct timex *txc);
#endif
#ifdef PRIVOPS_SETTIME
int PRV_SetTime(const struct timeval *tp, const struct timezone *tzp);
int PRV_SetTime(clockid_t clockid, const struct timespec *tp);
#else
#define PRV_SetTime settimeofday
#define PRV_SetTime clock_settime
#endif
#ifdef PRIVOPS_BINDSOCKET