freebsd: move net/if_mib.h to src/new module#5325
Open
dybucc wants to merge 1 commit into
Open
Conversation
There is a conflict of `NETLINK_GENERIC` definitions between `net/if_mib.h` and `netlink/netlink.h`. `netlink.h` is already exported in the crate root for Linux (and those definitions are already used by at least crates neli and netlink-packet-route.) `if_mib` does not seem to be too widely used just yet, so this moves the `if_mib` module contents into a namespace of their own to make space for `netlink` support on FreeBSD (rust-lang#3194.) Signed-off-by: Yann Dirson <yann.dirson@vates.fr> Co-authored-by: dybucc <149513579+dybucc@users.noreply.github.com>
This was referenced Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR updates #3367 by rebasing onto latest
mainand adjusting the solutionto fit the plan outlined at 1.
The patch itself moves the
net/if_mib.hdefinitions that overlap with those ofnetlink/netlink.hinto a module of their own under thenewmodule. This isto avoid blocking future additions of
netlink.hAPI, which seems moreprevalent according to the author of #3367.
This should unblock #3201.
Checklist
libc-test/semverhave been updated*LASTor*MAXhave the standarddoc comment
cargo test -p libc-test --target mytarget); especiallyrelevant for platforms that may not be checked in CI
@rustbot label +stable-nominated
Footnotes
https://github.com/rust-lang/libc/pull/3201#issuecomment-4736374182 ↩