perfsonar / owamp

A tool for performing one-way or two-way active measurements
Apache License 2.0
72 stars 31 forks source link

owamp: use proper adjtimex() syscall name instead of glibc ntp_adjtime() alias #64

Closed kaniini closed 1 year ago

kaniini commented 4 years ago

the musl libc only provides the adjtimex() name, not the ntp one. this allows the owamp code to be portable to both glibc and musl libc.

mfeit-internet2 commented 3 years ago

Sorry for the inexcusably-late reply.

Pulling this change will break builds on non-Linux platforms.

Per adjtime(2):

CONFORMING TO

None of these interfaces is described in POSIX.1

adjtimex() and clock_adjtime() are Linux-specific and should not be used in programs intended to be portable.

The preferred API for the NTP daemon is ntp_adjtime().

My recommendation would be to leave the calls to ntp_adjtime() in place and conditionally define it as a preprocessor macro if there's a way to detect compilation against MUSL.

mfeit-internet2 commented 1 year ago

This was handled in #81 and #83.