Hi! I have sample code:
package guest
import (
"runtime"
"
golang.org/x/sys/unix"
)
func newTimeval(t int64) *unix.Timeval {
if runtime.GOARCH != "amd64" {
return &unix.Timeval{Sec: t / 1000000000, Usec:
int32(t) % 1000000000 / 1000}
}
return &unix.Timeval{Sec: t / 1000000000, Usec: t % 1000000000 / 1000}
}
when i'm try to build with GOOS=openbsd and GOARCH=amd64
i have error
cannot use int32(t) % 1000000000 / 1000 (type int32) as type int64 in
field value
when i'm try to build with GOOS=openbsd and GOARCH=386
i have error
cannot use t % 1000000000 / 1000 (type int64) as type int32 in field value
How to assign correct values specific for arch ?
--
Vasiliy Tolstov,
e-mail:
v.to...@selfip.ru