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

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

x/sys/unix: SockaddrStorage "__data" field not exported #24951

mdlayher opened this issue Apr 19, 2018 · 1 comment

Comments

@mdlayher
Copy link
Member

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
Copy link

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

@golang golang locked and limited conversation to collaborators Feb 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants