-
Notifications
You must be signed in to change notification settings - Fork 18k
x/sys/unix: missing Linux clock_adjtime #57618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
feel free to send a CL |
Hi, forks. I'm a newcomer who wants to contribute to the community. Can I assign myself and try to solve this issue? :) |
@kidddddddddddddddddddddd Go for it. Thanks. |
Thanks |
Got stucked by generate codes😅. |
Change https://go.dev/cl/463056 mentions this issue: |
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: