privops: add method PRV_AdjustFreq()

In preparation of adding OpenBSD support:

OpenBSD doesn't support timex but adjusting frequency using the
adjfreq(2) system call. Add a privops method PRV_AdjustFreq() to allow
unprivileged processes to set the time.
This commit is contained in:
Thomas Kupper
2026-02-04 21:53:52 +01:00
committed by Miroslav Lichvar
parent fd60dabde7
commit 9a57ef8dbf
2 changed files with 77 additions and 0 deletions

View File

@@ -64,6 +64,12 @@ void PRV_ReloadDNS(void);
#define PRV_ReloadDNS DNS_Reload
#endif
#ifdef PRIVOPS_ADJUSTFREQ
int PRV_AdjustFreq(const int64_t *freq, int64_t *oldfreq);
#else
#define PRV_AdjustFreq adjfreq
#endif
#ifdef PRIVOPS_HELPER
void PRV_Initialise(int scfilter_level);
void PRV_StartHelper(void);