-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
Thanks for the ppoll fix! Unfortunately:
- What version of Go are you using (
go version)?
go 1.6.1 - What operating system and processor architecture are you using (
go env)?
GOARCH="arm64"
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GO15VENDOREXPERIMENT="1"
CC="gcc"
CGO_ENABLED="1" - What did you do?
go get golang.org/x/sys/unix - What did you expect to see?
Successful completion - What did you see instead?
# golang.org/x/sys/unix
src/golang.org/x/sys/unix/syscall_linux_arm64.go:185: cannot use new(*Timespec) (type **Timespec) as type *Timespec in assignment
src/golang.org/x/sys/unix/syscall_linux_arm64.go:186: cannot use timeout * 1e+06 (type int) as type int64 in argument to NsecToTimespec
I can get it to build with the following patch:
diff --git a/unix/syscall_linux_arm64.go b/unix/syscall_linux_arm64.go
index 4211cf6..4b6ff2a 100644
--- a/unix/syscall_linux_arm64.go
+++ b/unix/syscall_linux_arm64.go
@@ -182,8 +182,8 @@ const (
func Poll(fds []PollFd, timeout int) (n int, err error) {
var ts *Timespec
if timeout >= 0 {
- ts = new(*Timespec)
- *ts = NsecToTimespec(timeout * 1e6)
+ ts = new(Timespec)
+ *ts = NsecToTimespec(int64(timeout) * 1e6)
}
if len(fds) == 0 {
return ppoll(nil, 0, ts, nil)
Does the gopherbot not do compile tests for each GOARCH?