Skip to content

Wrong type in syscall type Utsname: uint8 instead of int8 #13318

Closed
@StefanScherer

Description

@StefanScherer
  • 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.

Is there any reason that the type is different here?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions