Add RTF_*, RTA_*, RTAX_*, RTM_* definitions on BSDs#3714
Merged
tgross35 merged 1 commit intorust-lang:mainfrom Oct 15, 2024
Merged
Add RTF_*, RTA_*, RTAX_*, RTM_* definitions on BSDs#3714tgross35 merged 1 commit intorust-lang:mainfrom
tgross35 merged 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use |
Collaborator
tesuji
commented
May 19, 2024
4a0d782 to
cffe959
Compare
jbeich
reviewed
May 20, 2024
|
Do you plan to unify with macOS (same ancestor) by moving RTM_ADD and other constants with same values to src/unix/bsd/mod.rs ? |
7e8a9c5 to
9d8b39c
Compare
|
Please, don't remove error[E0425]: cannot find value `RTAX_MAX` in crate `libc`
--> cargo-crates/iroh-net-0.16.2/src/net/interfaces/bsd.rs:875:46
|
875 | let mut addrs = Vec::with_capacity(libc::RTAX_MAX as usize);
| ^^^^^^^^ not found in `libc`
error[E0425]: cannot find value `RTAX_MAX` in crate `libc`
--> cargo-crates/iroh-net-0.16.2/src/net/interfaces/bsd.rs:879:23
|
879 | for i in 0..libc::RTAX_MAX as usize {
| ^^^^^^^^ not found in `libc`
|
help: you might have meant to write `.` instead of `..`
|
879 - for i in 0..libc::RTAX_MAX as usize {
879 + for i in 0.libc::RTAX_MAX as usize {
| |
Contributor
|
At first glance this looks okay, but there are a couple things needed. Could you please do the following?
|
Contributor
|
@rustbot author |
Collaborator
Contributor
|
It'd be great to land this, so mozilla/mtu#29 would work on the BSDs. |
* Unify RTM_ADD and friends under bsd namespace * Keeps RTAX_MAX as it is used to loop over alternate internal encoding.
semarie
added a commit
to semarie/rust-libc
that referenced
this pull request
Oct 15, 2024
semarie
added a commit
to semarie/rust-libc
that referenced
this pull request
Oct 15, 2024
semarie
added a commit
to semarie/rust-libc
that referenced
this pull request
Oct 15, 2024
Contributor
|
Going to wait on the backport until #3970 is figured out. |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 16, 2024
unbreak OpenBSD after #3714 by properly define RTF_FMASK
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Oct 16, 2024
* Unify RTM_ADD and friends under bsd namespace * Keeps RTAX_MAX as it is used to loop over alternate internal encoding. (backport <rust-lang#3714>) (cherry picked from commit e1566fd)
Merged
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Oct 16, 2024
(backport <rust-lang#3970>) (cherry picked from commit dbe4b8b)
mxinden
added a commit
to mxinden/mtu
that referenced
this pull request
Nov 29, 2024
mozilla#29 added the following `libc` import: ``` rust use libc::{ freeifaddrs, getifaddrs, getpid, if_data, if_indextoname, ifaddrs, in6_addr, in_addr, sockaddr_in, sockaddr_in6, sockaddr_storage, AF_UNSPEC, PF_ROUTE, RTAX_MAX, }; ``` `RTAX_MAX` was added in `libc` `0.2.160`: https://github.com/rust-lang/libc/releases/tag/0.2.160 More specifically rust-lang/libc#3714. This commit makes sure the above new requirement is encoded in the `mtu` `Cargo.toml` `libc` dependency declaration. See CI failure without discussed in mozilla#51 (comment).
AkhilTThomas
pushed a commit
to AkhilTThomas/libc
that referenced
this pull request
Feb 5, 2025
* Unify RTM_ADD and friends under bsd namespace * Keeps RTAX_MAX as it is used to loop over alternate internal encoding. (backport <rust-lang#3714>) (cherry picked from commit e1566fd)
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.
Grep from:
Closes #3711.
@rustbot review