Skip to content

Conversation

name1e5s
Copy link
Contributor

close #95866

It seems that libc doesn't implement fn si_addr in siginfo_t for uclibc, which causes the build broken. This PR partially revert #95688 to fix the problem.

@rust-highfive
Copy link
Contributor

r? @kennytm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 10, 2022
@@ -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"))]
Copy link
Contributor

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
Copy link
Contributor

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().

@pfmooney
Copy link
Contributor

Opened rust-lang/libc#2750 to hopefully bring uclibc into parity with the other UNIX-y platforms WRT siginfo_t accessors.

@skrap
Copy link
Contributor

skrap commented May 2, 2022

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!)

@skrap
Copy link
Contributor

skrap commented May 2, 2022

I suggest abandoning this PR in favor of #96656

@name1e5s name1e5s closed this May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

std lib build broken for uclibc
5 participants