-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unified all Linux sockopts definitions by arch #2135
Conversation
r? @JohnTitor (rust-highfive has picked a reviewer for you, use r? to override) |
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 think we can declare SO_INCOMING_CPU
as 49 on musl and uclibc regardless of the arch, cannot we? I'd like to declare this on linux/mod.rs
with a cfg for the sparc targets.
I wouldn't suggest that. Because there still have other targets, like |
What the target depends on |
I have no idea. I don't know if there are other arch/env has different values right now or in the future. Anyway, I am not familiar with |
Creating PRs one by one to fix builds is not reasonable, and not gating it with a cfg or defining it for all linux_like/linux targets at once increases review/maintenance costs. And I'm not sure why you put it to each uclibc file instead of mod.rs as it should be the same value for all the uclibc from what I see https://doc.rust-lang.org/nightly/rustc/platform-support.html. |
cfg_if! {
if #[cfg(target_arch = "parisc")] {
// arch/parisc/include/uapi/asm/socket.h
pub const SO_INCOMING_CPU = 0x402A;
} else if #[cfg(target_arch = "sparc")] {
// arch/sparc/include/uapi/asm/socket.h
pub const SO_INCOMING_CPU = 0x0033;
} else {
// include/uapi/asm-generic/socket.h
// arch/alpha/include/uapi/asm/socket.h
// tools/include/uapi/asm-generic/socket.h
// arch/mips/include/uapi/asm/socket.h
pub const SO_INCOMING_CPU = 49;
}
} Should I put this block in |
AFAIK we don't have any |
This commit:
|
Unified all Linux sockopts definitions by arch - ref rust-lang/socket2#213
💔 Test failed - checks-actions |
Ah... Ok. Well, you can just merge #2109 and I will rebase my branch. This is quite a big change. I have checked several times with my eyes but ... you should double check again. |
What does this build fail mean? |
That's because Cirrus CI re-scheduled the jobs, @bors try |
Unified all Linux sockopts definitions by arch - ref rust-lang/socket2#213
💔 Test failed - checks-actions |
The failure is:
We should allow it. |
Oh, you have merged that regression-test PR. Shoudl I rebase it? |
It's unnecessary; bors automatically rebases to master. |
I tried to rebase locally without any conflicts. |
It shouldn't have any conflicts, I mean, there's no need to rebase but you can if you like (or if you want to run it on your local). |
@bors try -- let's check it anyway. |
@bors try |
Unified all Linux sockopts definitions by arch - ref rust-lang/socket2#213
☀️ Try build successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13 |
@JohnTitor I think it is ready to be merged. |
- fixed other missing SO_INCOMING_CPU definition in rust-lang/socket2#213
@bors try |
Unified all Linux sockopts definitions by arch - ref rust-lang/socket2#213 Fixes #2133
💥 Test timed out |
Seems GHA won't start their jobs. |
@bors try |
Unified all Linux sockopts definitions by arch - ref rust-lang/socket2#213 Fixes #2133
☀️ Try build successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13 |
Awesome, thanks for the clean-up! |
📌 Commit 682eba6 has been approved by |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13 |
Thanks for doing this @zonyitoo. |
Fixes #2133