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
[WIP] freebsd: netlink #3070
[WIP] freebsd: netlink #3070
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon. Please see the contribution instructions for more information. |
2cec490
to
cbd5ecc
Compare
@JohnTitor pls help, not sure what causes CI failures and local |
It looks like FreeBSD image on CI needs to be updated |
e7c8325
to
6bfbe9e
Compare
☔ The latest upstream changes (presumably #3073) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
Also, I suggest you add only what you plan to use now, otherwise it will be very difficult to review.
@@ -29,7 +29,7 @@ task: | |||
task: | |||
name: nightly x86_64-unknown-freebsd-14 | |||
freebsd_instance: | |||
image: freebsd-14-0-current-amd64-v20220902 | |||
image_family: freebsd-14-0-snap |
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.
Sorry for the merge conflict but I updated it on master, could you rebase?
@@ -1995,6 +2003,7 @@ fn test_freebsd(target: &str) { | |||
"utime.h", | |||
"utmpx.h", | |||
"wchar.h", | |||
|
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.
This should be unnecessary.
|
||
|
||
|
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.
@@ -228,6 +228,7 @@ s! { | |||
/// kthread flag. | |||
pub ki_tdflags: ::c_long, | |||
} | |||
|
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.
s! { | ||
/// Netlink Message Header | ||
pub struct nlmsghdr { | ||
/// Length of message including header |
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.
Tabs are denied in this repo, could you replace them with white spaces?
@@ -0,0 +1,339 @@ | |||
|
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.
Don't separate files, we put all the items into one file unless it needs a cfg or something else.
☔ The latest upstream changes (presumably #3203) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing for inactivity but feel free to recreate a new one if you're still interested in this and have time to work on. Thanks anyway! |
Netlink support was merged into FreeBSD-14 recently
https://github.com/freebsd/freebsd-quarterly/blob/main/2022q4/netlink.adoc
https://reviews.freebsd.org/D36002
https://reviews.freebsd.org/source/src/browse/main/sys/netlink/netlink.h
https://reviews.freebsd.org/source/src/browse/main/sys/netlink/netlink_route.h
https://reviews.freebsd.org/source/src/browse/main/sys/netlink/netlink_generic.h
This PR aims to add missing libc definitions. This is my first time contributing to rust and this crate and I have a bunch of questions:
It is not clear when
s!
macro is supposed to be used vss_with_no_extra_traits!
, I couldn't decipher macros definitions to figure this out.How to avoid test failures on earlier versions of FreeBSD? This functionality is only available on latest builds of FreeBSD-CURRENT (14)
libc-test/semver
seems to not care about versions of the OS, is there a way to specify symbols for specific version of the OS?libc-test/semver
when you add/remove item(s)rustc ci/style.rs && ./style src
cd libc-test && cargo test
(This might fail on your env due to environment difference between your env and CI. Ignore failures if you are not sure.)