It seems that musl libc and uClibc without UCLIBC_NTP_LEGACY
does not provide ntp_gettime and compile will fail.
References: https://github.com/karelzak/util-linux/issues/174
Signed-off-by: Karel Zak <kzak@redhat.com>
lseek64 \
mempcpy \
nanosleep \
+ ntp_gettime \
open_memstream \
personality \
posix_fadvise \
{
char *hostname = NULL;
char pid[32], time[64], timeq[80];
-#ifdef HAVE_SYS_TIMEX_H
- struct ntptimeval ntptv;
-#endif
struct timeval tv;
struct tm *tm;
snprintf(pid, sizeof(pid), " %d", ctl->pid);
if (ctl->rfc5424_tq) {
-#ifdef HAVE_SYS_TIMEX_H
+#ifdef HAVE_NTP_GETTIME
+ struct ntptimeval ntptv;
+
if (ntp_gettime(&ntptv) == TIME_OK)
snprintf(timeq, sizeof(timeq),
" [timeQuality tzKnown=\"1\" isSynced=\"1\" syncAccuracy=\"%ld\"]",