From 836b47cb7e99a977c5a23b059ca1d0b5065d310e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 24 Jul 2024 11:54:23 +0200 Subject: Merging upstream version 1.46.3. Signed-off-by: Daniel Baumann --- src/libnetdata/os/adjtimex.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/libnetdata/os/adjtimex.c (limited to 'src/libnetdata/os/adjtimex.c') diff --git a/src/libnetdata/os/adjtimex.c b/src/libnetdata/os/adjtimex.c new file mode 100644 index 000000000..b7a910095 --- /dev/null +++ b/src/libnetdata/os/adjtimex.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "../libnetdata.h" + +int os_adjtimex(struct timex *buf __maybe_unused) { +#if defined(OS_MACOS) || defined(OS_FREEBSD) + return ntp_adjtime(buf); +#endif + +#if defined(OS_LINUX) + return adjtimex(buf); +#endif + + errno = ENOSYS; + return -1; +} -- cgit v1.2.3