Skip to content

[0.2] Backports #4468

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 29 commits into from
Jun 2, 2025
Merged

[0.2] Backports #4468

merged 29 commits into from
Jun 2, 2025

Conversation

nyurik added 5 commits June 1, 2025 23:20
run cargo clippy for all targets

(backport <rust-lang#4411>)
(cherry picked from commit bea4d1b)
(backport <rust-lang#4411>)
(cherry picked from commit 5997a8b)
(backport <rust-lang#4411>)
(cherry picked from commit e09683e)
(backport <rust-lang#4416>)
(cherry picked from commit 444d9df)
run `cargo clippy --all-targets` on `libc-test/build.rs`, and fix all default issues.

Notes:

* `copy_dir_hotfix` had a `replace` parameter that was never used

(backport <rust-lang#4412>)
[ adjust section heading to avoid ### turning into comment - Trevor ]
(cherry picked from commit 8b15e27)
@rustbot
Copy link
Collaborator

rustbot commented Jun 1, 2025

Some changes occurred in the Android module

cc @maurer

Some changes occurred in solarish module

cc @jclulow, @pfmooney

Some changes occurred in OpenBSD module

cc @semarie

@rustbot
Copy link
Collaborator

rustbot commented Jun 1, 2025

⚠️ Warning ⚠️

  • Pull requests are usually filed against the main branch for this repo, but this one is against libc-0.2. Please double check that you specified the right target!

nyurik and others added 5 commits June 1, 2025 23:44
(backport <rust-lang#4415>)
[ drop changes around the FreeBSD version in build.rs since the logic
  isn't the same - Trevor ]
(cherry picked from commit a283b9e)
(backport <rust-lang#4436>)
(cherry picked from commit 0d7f0ce)
This will be chosen based on the RUST_LIBC_UNSTABLE_MUSL_V1_2_3
variable.

Co-authored-by: Daniel Frampton <Daniel.Frampton@microsoft.com>

(backport <rust-lang#4443>)
(cherry picked from commit e7762a8)
xbjfk and others added 19 commits June 1, 2025 23:44
This commit gates various workarounds of older musl versions behind the
RUST_LIBC_UNSTABLE_MUSL_V1_2_3 variable.

(backport <rust-lang#4443>)
(cherry picked from commit 85a7c85)
This was accidentally set to 0 in upstream, but fixed in commit b8b729b.
If running with prior versions without that commit, this commit
effectively backports it.

(backport <rust-lang#4443>)
(cherry picked from commit 686aa7a)
This feature, controlled by the environment variable
RUST_LIBC_UNSTABLE_MUSL_V1_2_3 will control whether breaking changes up
to musl v1.2.3 will be reflected

(backport <rust-lang#4443>)
(cherry picked from commit 2a68f7f)
This ut_session has changed from long to int + padding in newer
versions. This was already reflected on loongarch64 and ohos - this
commit adds this change, and re-enables the test when musl_v1_2_3 is
set.

Co-authored-by: Ariadne Conill <ariadne@dereferenced.org>

(backport <rust-lang#4443>)
(cherry picked from commit 1038c7f)
This reflects the upstream commits, 5e0c9f2 and d4f2981, which reflect
changes in linux 5.4 and 5.5 respectively

As mentioned in the comments, this is possible now as the CI musl version
has updated and the headers are newer.

(backport <rust-lang#4443>)
(cherry picked from commit fb4212a)
This reflects upstream commit 2507e7f. This should be safe to change as
this has been marked deprecated to warn people it will change across OS
versions since 0.2.64 (>5 years ago)

(backport <rust-lang#4443>)
(cherry picked from commit 5d24ad2)
This isn't strictly related to musl 1.2.3, however now presents a good
time to change it, before the 1.0 release.

(backport <rust-lang#4443>)
(cherry picked from commit 3f81aad)
The architecture-specific definitions was removed in upstream commit
319b2d0, changing the type to the generic definition of int.

(backport <rust-lang#4443>)
(cherry picked from commit 3f91173)
This silences shellcheck warnings

(backport <rust-lang#4443>)
(cherry picked from commit 60f7b3d)
Disable warnings when crosslinking issues, since we do want contributors
to do this.

Cc: rust-lang/triagebot#1966

(backport <rust-lang#4444>)
(cherry picked from commit 6a8609c)
(backport <rust-lang#4452>)
(cherry picked from commit 6e7549d)
(backport <rust-lang#4454>)
(cherry picked from commit adcb2b8)
Currently only `src/` is checked. Add a run that covers everything else.

This does mean files in `src/` get formatted twice, but `cargo fmt`
doesn't support an `--exclude` option.

(backport <rust-lang#4454>)
(cherry picked from commit 1ca8b36)
There are no longer any shell files in `ctest/`, so this FIXME can be
resolved.

Also move this to the end so missing shellcheck doesn't exit before the
sort checks.

(backport <rust-lang#4454>)
[ note - this backport doesn't do much since `ctest/` was never
  excluded, but it does keep file structure in sync - Trevor ]
(cherry picked from commit 654bf4e)
* Declare `arc4random` and `arc4random_buf` as extern "C" functions in the NuttX module
* Enable access to system-provided random number generation for NuttX targets
* Aligns NuttX FFI with other Unix platforms that expose these functions

This change allows Rust code targeting NuttX to use `arc4random` and `arc4random_buf` for secure random number generation, improving compatibility and feature parity with other targets.

(backport <rust-lang#4464>)
(cherry picked from commit f8e4746)
@tgross35 tgross35 enabled auto-merge June 1, 2025 23:49
@tgross35 tgross35 added this pull request to the merge queue Jun 2, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 2, 2025
@tgross35 tgross35 added this pull request to the merge queue Jun 2, 2025
Merged via the queue into rust-lang:libc-0.2 with commit c56fd04 Jun 2, 2025
47 of 48 checks passed
@tgross35 tgross35 deleted the backport-ghost branch June 2, 2025 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.