Skip to content

fix: compatiblity with next libc release - #2821

Draft
xtqqczze wants to merge 3 commits into
nix-rust:masterfrom
xtqqczze:next-libc
Draft

fix: compatiblity with next libc release#2821
xtqqczze wants to merge 3 commits into
nix-rust:masterfrom
xtqqczze:next-libc

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread Cargo.toml
path = "test/sys/test_prctl.rs"

[patch.crates-io]
libc = { git = "https://github.com/rust-lang/libc", branch = "libc-0.2" }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I know that this PR isn't ready to merge yet, but please ensure that when it is, you patch to a specific revision of libc-0.2, not a branch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When it is ready to merge, the patch will be removed.

@xtqqczze

xtqqczze commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

@asomers Unfortunately, given the current state of CI, I’m not particularly motivated to spend more time on this right now. That said, I don’t think it’s a good situation for nix to break with the next libc release.

For an idea of the type of changes that may be required, see the corresponding PR in rustix: bytecodealliance/rustix#1676

needed to fix semicolon_in_expressions_from_macros error in minver

```log
error: trailing semicolon in macro used in expression position
  --> build.rs:4:5
   |
 4 | /     cfg_aliases! {
 5 | |         android: { target_os = "android" },
 6 | |         dragonfly: { target_os = "dragonfly" },
 7 | |         ios: { target_os = "ios" },
...  |
27 | |         solarish: { any(illumos, solaris) },
28 | |     }
   | |_____^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #79813 <rust-lang/rust#79813>
   = note: `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default
   = note: this error originates in the macro `$crate::cfg_aliases` which comes from the expansion of the macro `cfg_aliases` (in Nightly builds, run with -Z macro-backtrace for more info)
   ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants