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

server: portability fix for setsockopt() on Linux #1095

Closed
wants to merge 1 commit into from

Conversation

vincentbernat
Copy link
Contributor

On some architecture, setsockopt() is a multiplexed syscall and is not
available directly (for example, on i386). Instead of invoking the
syscall directly, use syscall.SetsockoptString() which is safe as strings
are not null-terminated with Go.

On BSD, use syscall.SetsockoptInt(), but I don't know if there are
architectures with the same limitations as for Linux. I didn't test, but the change seems trivial.

Signed-off-by: Vincent Bernat vincent@bernat.im

On some architecture, setsockopt() is a multiplexed syscall and is not
available directly (for example, on i386). Instead of invoking the
syscall directly, use syscall.SetsockoptString() which is safe as strings
are not null-terminated with Go.

On BSD, use syscall.SetsockoptInt(), but I don't know if there are
architectures with the same limitations as for Linux.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
@fujita
Copy link
Member

fujita commented Sep 13, 2016

So sorry about the delay, it took time to fix the CI system. Now it's back. I've pushed this.
Thanks a lot!

@fujita fujita closed this Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants