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: SockaddrStorage "__data" field not exported #24951

Open
mdlayher opened this issue Apr 19, 2018 · 1 comment

Comments

@mdlayher
Copy link
Member

commented Apr 19, 2018

The current SockaddrStorage type is not useful because the __data field is not exported due to being named X__ss_padding by default when run through the code generator.

In addition, the data type of this field is a either an array of uint8 or int8 on various platforms, which will make it difficult to use.

I will submit a change to export this field as Data and simplify all of the array types to an array of bytes.

See also:
https://go-review.googlesource.com/c/sys/+/106656
https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/socket.h#L14

And a similar workaround applied with:
https://go-review.googlesource.com/c/sys/+/107415

@gopherbot gopherbot added this to the Unreleased milestone Apr 19, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Apr 19, 2018

Change https://golang.org/cl/108195 mentions this issue: unix: export Data field of SockaddrStorage on Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.