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
Add more items for FreeBSD #2549
Conversation
r? @Amanieu (rust-highfive has picked a reviewer for you, use r? to override) |
1c3f64b
to
8387508
Compare
This is now ready! |
r? @JohnTitor |
3c01a0a
to
38398eb
Compare
It'd be great if you could also rebase this to test with a new FreeBSD 14 CI, as it currently doesn't gate bors (I guess #2545 will be merged in an hour). |
Sure! Please ping me then so I can update my PR. |
@GuillaumeGomez It has been merged now! |
38398eb
to
750e2e0
Compare
I added some freebsd14 items and updated the other |
CI is happy! \o/ |
pub const CTL_SYSCTL_DEBUG: ::c_int = 0; | ||
pub const CTL_SYSCTL_NAME: ::c_int = 1; | ||
pub const CTL_SYSCTL_NEXT: ::c_int = 2; | ||
pub const CTL_SYSCTL_NAME2OID: ::c_int = 3; | ||
pub const CTL_SYSCTL_OIDFMT: ::c_int = 4; | ||
pub const CTL_SYSCTL_OIDDESCR: ::c_int = 5; | ||
pub const CTL_SYSCTL_OIDLABEL: ::c_int = 6; | ||
cfg_if! { | ||
if #[cfg(any(freebsd13, freebsd14))] { |
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.
Let's avoid using cfg(freebsdN)
here, it makes it hard to maintain FreeBSD N modules when removing/adding a module (that's why I moved kinfo_proc
).
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.
The problem is that there isn't a way to say "all freebsd version starting X".
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 the problem with kinfo_proc
was different: it was included in all version by default, in here it's only included in freebsd13 and freebsd14. If freebsd15 is released, it won't be impacted.
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.
I meant, if we add FreeBSD 15, for instance, we will have to tweak each cfgs, it'll bring more tasks. But we declare them on FreeBSD 13 and FreeBSD 14, we'll just have to copy the FreeBSD 14 module, and if something is changed, we need to change them only.
However, I just remembered #2465, TL;DR newly added consts don't have to be gated and we can just declare them for simplicity.
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.
Oh nice! Updating then.
02dbe74
to
e66a88c
Compare
Simplified consts handling as suggested. :) |
Hm, seems there are still cfg'd consts, is there any reason that they should be? |
Definitely not, my bad, completely missed them... Updating. |
f89ac14
to
528ceee
Compare
528ceee
to
441f195
Compare
Done! |
Great, thanks! @bors r+ |
📌 Commit 441f195 has been approved by |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13 |
No description provided.