Rollup merge of #138673 - taiki-e:trusty-fix, r=Noratrieb

Fix build failure on Trusty

This target is currently broken due to update to 2024 editon.

```console
$ cargo new --lib repro
$ cd repro
$ cargo check -Z build-std=std --target aarch64-unknown-trusty
   Compiling std v0.0.0 ($HOME/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std)
error: extern blocks must be unsafe
 --> $HOME/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/random/trusty.rs:1:1
  |
1 | / extern "C" {
2 | |     fn trusty_rng_secure_rand(randomBuffer: *mut core::ffi::c_void, randomBufferLen: libc::size_t);
3 | | }
  | |_^

error: could not compile `std` (lib) due to 1 previous error
```

cc ```@randomPoison``` ```@ahomescu``` ([target maintainers](https://doc.rust-lang.org/nightly/rustc/platform-support/trusty.html#target-maintainers))
This commit is contained in:
Matthias Krüger 2025-03-22 11:59:18 +01:00 committed by GitHub
commit 14f6216cf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
extern "C" {
unsafe extern "C" {
fn trusty_rng_secure_rand(randomBuffer: *mut core::ffi::c_void, randomBufferLen: libc::size_t);
}