Skip to content

Enable IP_BOUND_IF on illumos and Solaris (#561) #566

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

Conversation

hawkw
Copy link
Contributor

@hawkw hawkw commented Mar 20, 2025

The IP_BOUND_IF socket option, which is wrapped by the Socket::bind_device_by_index_{v4,v6} and
Socket::device_index_{v4,v6} is available on SunOS-like systems, such as illumos and Solaris, as well as macOS-like systems. However, these APIs are currently cfg-flagged to only be available on macOS-like systems.

This commit changes the cfg attributes to also enable these APIs on illumos and Solaris.

Fixes #560
This is a backport of PR #561 to the v0.5.x branch.

The `IP_BOUND_IF` socket option, which is wrapped by the
`Socket::bind_device_by_index_{v4,v6}` and
`Socket::device_index_{v4,v6}` is available on SunOS-like systems, such
as illumos and Solaris, as well as macOS-like systems. However, these
APIs are currently cfg-flagged to only be available on macOS-like
systems.

This commit changes the cfg attributes to also enable these APIs on
illumos and Solaris.

Fixes rust-lang#560
@Thomasdezeeuw Thomasdezeeuw merged commit d95e914 into rust-lang:v0.5.x Mar 20, 2025
43 checks passed
@Thomasdezeeuw
Copy link
Collaborator

Thanks once more @hawkw

@hawkw
Copy link
Contributor Author

hawkw commented Mar 27, 2025

@Thomasdezeeuw anything I can do to help get a release with this published? It would be nice to be able to move forward on the hyper-util and reqwest changes depending on it...

@Thomasdezeeuw
Copy link
Collaborator

We don't have a release schedule, I just make releases on request. I'll try to make a release this weekend.

@Thomasdezeeuw
Copy link
Collaborator

@hawkw socket2 v0.5.9 was just released

@hawkw
Copy link
Contributor Author

hawkw commented Mar 31, 2025

Thank you again!

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.

2 participants