Description
- What version of Go are you using (go version)?
go version go1.4.3 linux/arm
- What operating system and processor architecture are you using?
$ uname -a
Linux ef19e7655f61 4.2.5-263 #1 SMP Wed Nov 4 17:03:17 UTC 2015 armv7l armv7l armv7l GNU/Linux
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.2 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
- What did you do?
I want to compile Docker for ARM but stumbled upon a problem that the type of Utsname is different for linux/arm to all other intel platforms.
Also the official golang docs says that it uses [65]int8
but for linux/arm it is [65]uint8
.
- What did you expect to see?
To have the same types for linux/arm
- What did you see instead?
I had to add a workaround to read the value into a string in two different ways, one for intel, one for linux/arm.
- linux/386: https://github.com/golang/go/blob/master/src/syscall/ztypes_linux_386.go#L555-L560
- linux/amd64: https://github.com/golang/go/blob/master/src/syscall/ztypes_linux_amd64.go#L571-L576
- linux/arm: https://github.com/golang/go/blob/master/src/syscall/ztypes_linux_arm.go#L543-L548
- linux/arm64: https://github.com/golang/go/blob/master/src/syscall/ztypes_linux_arm64.go#L549-L554
Is there any reason that the type is different here?