-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add missing definitions for QNX8 for several BPF-related structures and constants #4769
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
base: main
Are you sure you want to change the base?
Conversation
f1b2a57 to
7d27d60
Compare
|
This looks fine to me, cc target maintainers @flba-eb @gh-tr @jonathanpallant @japaric to verify things build |
tgross35
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you actually mind moving this to the src/new module? We're slowly starting to migrate things there since it's easier to match up with what a user can #include. I believe this would be src/new/nto/net/if.h and src/new/nto/net/bpf.h, unless nto has a different structure. You can either move the existing BPF items over or not, your call.
Then this update to src/new/nto/mod.rs:
pub(crate) mod net {
pub(crate) mod route;
}And at
Lines 171 to 186 in 564e0ef
| // Per-OS headers we export | |
| cfg_if! { | |
| if #[cfg(target_os = "android")] { | |
| pub use sys::socket::*; | |
| } else if #[cfg(target_os = "linux")] { | |
| pub use linux::can::bcm::*; | |
| pub use linux::can::j1939::*; | |
| pub use linux::can::raw::*; | |
| pub use linux::can::*; | |
| pub use linux::keyctl::*; | |
| #[cfg(target_env = "gnu")] | |
| pub use net::route::*; | |
| } else if #[cfg(target_vendor = "apple")] { | |
| pub use signal::*; | |
| } | |
| } |
After that and the __c_anonymous_ifc_ifcu removal I'll merge this given we haven't heard back from the maintainers but this is straightforward.
| pub union __c_anonymous_ifc_ifcu { | ||
| pub ifcu_buf: *mut c_char, | ||
| pub ifcu_req: *mut ifreq, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed something: is this union used at all?
Can you usually |
Description
These structures are required for working with BPF filters and network interfaces on the QNX8 platform. Their absence currently prevents building or using BPF-related functionality with libc on QNX8 targets.
Sources
Updated
src/unix/nto/mod.rsaccordinglyChecklist
libc-test/semverhave been updated-> No tests for QNX?
*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI.-> even main branch does not work.
Error: could not execute process
/home/user/libc/target/x86_64-pc-nto-qnx800/debug/deps/libc-67e46525c5118905(never executed)