Skip to content

libnet/d/bridge: fix compilation on i386 #49526

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

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

akerouanton
Copy link
Member

- What I did

On i386, Linux doesn't provide direct socket syscall but instead multiplexes them through the socketcall syscall (see man 2 socketcall).

- How I did it

This commit fixes compilation for i386 by wrapping the offending syscall in a new function that uses the socketcall syscall on i386, and the setsockopt syscall on other archs.

- How to verify it

GOARCH=386 ./hack/make.sh binary

- Human readable description for the release notes

Fix compilation on i386

On i386, Linux doesn't provide direct socket syscall but instead
multiplexes them through the socketcall syscall (see `man 2 socketcall`).
This commit fixes compilation for i386 by wrapping the offending syscall
in a new function that uses the socketcall syscall on i386, and
the `setsockopt` syscall on other archs.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
Copy link
Contributor

@robmry robmry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akerouanton akerouanton added this to the 28.0.1 milestone Feb 24, 2025
@vvoland vvoland merged commit a5008d4 into moby:master Feb 24, 2025
168 checks passed
Comment on lines -678 to -679
options := sctp.InitMsg{NumOstreams: sctp.SCTP_MAX_STREAM}
if _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression point was b3fabed correct? So from that, there's low risk of that getting into any of the release branches

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, only v28.0.0 is affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to Build Docker 28.0.0 on x86 (32-bit)
4 participants