-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
fix std lib build for uclibc #95870
fix std lib build for uclibc #95870
Conversation
r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) |
@@ -54,6 +54,22 @@ mod imp { | |||
use crate::sys::unix::os::page_size; | |||
use crate::sys_common::thread_info; | |||
|
|||
#[cfg(any(target_os = "linux", target_os = "android"))] |
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.
Looking at the linux-like targets in libc, it looks like only uclibc is missing the si_addr()
accessor at the moment. Would it make sense to leave the existing logic in place, adding the supplemental accessor definition for only target_env = uclibc
?
|
||
#[cfg(not(any(target_os = "linux", target_os = "android")))] | ||
unsafe fn siginfo_si_addr(info: *mut libc::siginfo_t) -> usize { | ||
(*info).si_addr as usize |
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.
Going back to the si_addr
field accessor, rather than the si_addr()
function will break illumos, like in the initial version of #94052). At the very least, non-Linux platforms should use `si_addr().
Opened rust-lang/libc#2750 to hopefully bring uclibc into parity with the other UNIX-y platforms WRT |
Given that rust-lang/libc#2750 has been merged, can this be abandoned, or transmuted into a bump of the libc version? (That's all that should be required at this point, I think!) |
I suggest abandoning this PR in favor of #96656 |
close #95866
It seems that
libc
doesn't implementfn si_addr
insiginfo_t
for uclibc, which causes the build broken. This PR partially revert #95688 to fix the problem.