Skip to content

Fix failing build of std on armv5te-unknown-linux-uclibceabi due to missing cmsg_len_zero #80088

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

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

operutka
Copy link
Contributor

I'm getting the following error when trying to build std on armv5te-unknown-linux-uclibceabi:

error[E0425]: cannot find value `cmsg_len_zero` in this scope
   --> /home/operutka/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/ext/net/ancillary.rs:376:47
    |
376 |             let data_len = (*cmsg).cmsg_len - cmsg_len_zero;
    |                                               ^^^^^^^^^^^^^ not found in this scope

Obviously, this branch:

cfg_if::cfg_if! {
    if #[cfg(any(target_os = "android", all(target_os = "linux", target_env = "gnu")))] {
        let cmsg_len_zero = libc::CMSG_LEN(0) as libc::size_t;
    } else if #[cfg(any(
                  target_os = "dragonfly",
                  target_os = "emscripten",
                  target_os = "freebsd",
                  all(target_os = "linux", target_env = "musl",),
                  target_os = "netbsd",
                  target_os = "openbsd",
              ))] {
        let cmsg_len_zero = libc::CMSG_LEN(0) as libc::socklen_t;
    }
}

does not cover the case all(target_os = "linux", target_env = "uclibc").

@rust-highfive
Copy link
Contributor

r? @dtolnay

(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 Dec 16, 2020
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay
Copy link
Member

dtolnay commented Dec 20, 2020

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 20, 2020

📌 Commit ec07815 has been approved by dtolnay

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 20, 2020
@bors
Copy link
Collaborator

bors commented Dec 21, 2020

⌛ Testing commit ec07815 with merge c813545...

@bors
Copy link
Collaborator

bors commented Dec 21, 2020

☀️ Test successful - checks-actions
Approved by: dtolnay
Pushing c813545 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 21, 2020
@bors bors merged commit c813545 into rust-lang:master Dec 21, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 21, 2020
@operutka operutka deleted the fix-cmsg-len-uclibc branch December 23, 2020 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants