x/sys/unix: missing Linux clock_adjtime #57618
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FeatureRequest
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (with 1.19.4)
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Try to use
unix.ClockAdjtime
What did you expect to see?
ClockAdjtime available in unix package.
clock_adjtime is like adjtimex but takes a clockid_t as it's first arg.
https://man7.org/linux/man-pages/man2/adjtimex.2.html
The unix pkg provides adjtimex and the associated Timex struct. It also provides the other functions that take a clockid_t (like ClockGettime).
clock_adjtime
is needed by programs that use PTP Hardware Clocks (e.g. https://github.com/facebook/time/blob/ecba0ea401caa4cd45f6bb2d261946cc5cc52a5d/phc/phc.go#L131)What did you see instead?
I got an error:
ClockAdjtime
is not declared by package unixFix
It can be written using Syscall like this:
I think it can be fixed in the unix package just by adding
to syscall_unix.go around line 1802.
The text was updated successfully, but these errors were encountered: