mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* <sys/timex.h> and NTP incompatibility (MOD_NANO)
@ 2016-02-01  7:38 Ulrich Windl
  2016-02-01  8:18 ` Vitezslav Samel
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Windl @ 2016-02-01  7:38 UTC (permalink / raw)
  To: linux-kernel

Hi folks!

I'd wish ntp_loopfilter.c would compile without problems. The mess is (I had fixed it about 15 years ago (keyword "PPSkit")) that Linux uses ADJ_* flags to do traditional adjtime() things, as well as NTP kernel-related things (That's why the Linux syscall is named adjtimex()).
NTP however expects the flags to have names like MOD_* to modify settings, and STA_* for status bits to test.

When <sys/timex.h>lacks a MOD_NANO, but has a STA_NANO, compilation of ntpd/ntp_loopfilter.c fails.

I'd wish this to be fixed. I don't know which "Bonehead weakener" is needed to get the fix permanently into Linux.

My proposal many years ago was to use ADJ_* style flags only for the Linux specialities (the adjtime() part of adjtimex()), and use the MOD_* style flags for the NTP part of adjtimex().

Regards,
Ulrich
---
Appendix: Linux has only these:
/* xntp 3.4 compatibility names */
#define MOD_OFFSET     ADJ_OFFSET
#define MOD_FREQUENCY  ADJ_FREQUENCY
#define MOD_MAXERROR   ADJ_MAXERROR
#define MOD_ESTERROR   ADJ_ESTERROR
#define MOD_STATUS     ADJ_STATUS
#define MOD_TIMECONST  ADJ_TIMECONST
#define MOD_CLKB       ADJ_TICK
#define MOD_CLKA       ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: <sys/timex.h> and NTP incompatibility (MOD_NANO)
  2016-02-01  7:38 <sys/timex.h> and NTP incompatibility (MOD_NANO) Ulrich Windl
@ 2016-02-01  8:18 ` Vitezslav Samel
  0 siblings, 0 replies; 2+ messages in thread
From: Vitezslav Samel @ 2016-02-01  8:18 UTC (permalink / raw)
  To: Ulrich Windl; +Cc: linux-kernel

	Hi!

On Mon, Feb 01, 2016 at 08:38:09AM +0100, Ulrich Windl wrote:
> Hi folks!
> 
> I'd wish ntp_loopfilter.c would compile without problems. The mess is
> (I had fixed it about 15 years ago (keyword "PPSkit")) that Linux uses
> ADJ_* flags to do traditional adjtime() things, as well as NTP
> kernel-related things (That's why the Linux syscall is named
> adjtimex()).
> NTP however expects the flags to have names like MOD_* to modify
> settings, and STA_* for status bits to test.
> 
> When <sys/timex.h> lacks a MOD_NANO, but has a STA_NANO, compilation
> of ntpd/ntp_loopfilter.c fails.

  This (userspace) header from glibc package was fixed back in Nov 2009
and was included in glibc-2.12 release dated May 2010. Seems like you
are using very old glibc package. Upgrade first and check again.

	Cheers,
		Vita

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-01  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01  7:38 <sys/timex.h> and NTP incompatibility (MOD_NANO) Ulrich Windl
2016-02-01  8:18 ` Vitezslav Samel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®