Skip to content
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

x/sys/unix: TimevalToNsec missing on linux arm 32bit #14643

Closed
nkovacs opened this issue Mar 4, 2016 · 7 comments
Closed

x/sys/unix: TimevalToNsec missing on linux arm 32bit #14643

nkovacs opened this issue Mar 4, 2016 · 7 comments

Comments

@nkovacs
Copy link

nkovacs commented Mar 4, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    1.6
  2. What operating system and processor architecture are you using (go env)?
    arm, raspbian (raspberry pi 2)
  3. What did you do?
    (Use play.golang.org to provide a runnable example, if possible.)
    Tried to install golang.org/x/sys/unix
  4. What did you expect to see?
  5. What did you see instead?
    It doesn't compile, because TimevalToNsec is missing from https://github.com/golang/sys/blob/master/unix/syscall_linux_arm.go
@ianlancetaylor ianlancetaylor changed the title TimevalToNsec missing on linux arm 32bit x/sys/unix: TimevalToNsec missing on linux arm 32bit Mar 4, 2016
@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Mar 4, 2016
sethvargo added a commit to hashicorp/consul-template that referenced this issue Mar 7, 2016
@morriswinkler
Copy link

are you serious, why don't you add

func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }

to /unix/syscall_linux_arm.go

@nkovacs
Copy link
Author

nkovacs commented Mar 8, 2016

Yes, I'm serious. This is a bug in x/sys/unix. That's why I reported it.

I already added it and it compiled and works, but that's just a short-term workaround until the bug gets fixed (hopefully soon, since it's trivial).

@morriswinkler
Copy link

so what is the context of the bug, it is a missing function in the arm version of the package, if you want i can test the fix on my beaglebone

anyway that comment was targeted on the comment in 13740e1e5a1ff0a3099bb13455bec9fd25d2027c

So why is it not possible to add the function to the platform ? It is exactly the same for all other platforms

https://github.com/golang/sys/blob/master/unix/syscall_darwin_arm.go#L22 for example

@nkovacs
Copy link
Author

nkovacs commented Mar 22, 2016

Someone probably forgot to add it to syscall_linux_arm.go.

@morriswinkler
Copy link

my guess too

is it going to be fixed ?

@bradfitz
Copy link
Contributor

Yes. It'll be fixed. No need to worry.

@morriswinkler
Copy link

great, all my worries are gone :) thanks

@bradfitz bradfitz self-assigned this Mar 22, 2016
@golang golang locked and limited conversation to collaborators Mar 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants