diff options
author | Suraj Neupane <suraj@netdata.cloud> | 2022-03-24 12:58:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-24 12:58:11 +0200 |
commit | 06300b1e42ca623e3b54f6dffeddb2506e3a0213 (patch) | |
tree | b453463ce6fd9f580821030f559510d4938dc296 /libnetdata | |
parent | 57d6c179c82a21faba20ff0d2995eee31d071935 (diff) |
timex: this plugin enables timex plugin for non-linux systems (#12489)
* timex: this plugin enables timex plugin for non-linux system
* refactoring and fixing PR comments
* move OS specific macros to libnetdata
* Update README.md
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
Diffstat (limited to 'libnetdata')
-rw-r--r-- | libnetdata/os.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libnetdata/os.h b/libnetdata/os.h index 7872f82b90..5e7746df89 100644 --- a/libnetdata/os.h +++ b/libnetdata/os.h @@ -57,4 +57,11 @@ extern pid_t get_system_pid_max(void); extern unsigned int system_hz; extern void get_system_HZ(void); +#include <sys/timex.h> +#if defined(__FreeBSD__) || defined(__APPLE__) +#define ADJUST_TIMEX(x) ntp_adjtime(x) +#else +#define ADJUST_TIMEX(x) adjtimex(x) +#endif + #endif //NETDATA_OS_H |