From c9a71dc2d31b73c00091a4082c1e989cee79f792 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Mon, 27 Jan 2025 07:03:08 +0000 Subject: [PATCH 1/4] Fix the `missing_abi` lint Recent versions of Rust require the ABI always be specified for `extern` functions, whereas it historically defaulted to `extern "C"`. Fix a few cases where this lint now gets raised by specifying `extern "C"`. --- src/macros.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index c9d96b7ab2906..b29f33d55cf33 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -243,7 +243,7 @@ cfg_if! { )*) => ($( #[inline] $(#[$attr])* - pub $($constness)* unsafe extern fn $i($($arg: $argty),*) -> $ret + pub $($constness)* unsafe extern "C" fn $i($($arg: $argty),*) -> $ret $body )*) } @@ -257,7 +257,7 @@ cfg_if! { )*) => ($( #[inline] $(#[$attr])* - pub $($constness)* extern fn $i($($arg: $argty),*) -> $ret + pub $($constness)* extern "C" fn $i($($arg: $argty),*) -> $ret $body )*) } @@ -285,7 +285,7 @@ cfg_if! { )*) => ($( #[inline] $(#[$attr])* - pub unsafe extern fn $i($($arg: $argty),*) -> $ret + pub unsafe extern "C" fn $i($($arg: $argty),*) -> $ret $body )*) } @@ -299,7 +299,7 @@ cfg_if! { )*) => ($( #[inline] $(#[$attr])* - pub extern fn $i($($arg: $argty),*) -> $ret + pub extern "C" fn $i($($arg: $argty),*) -> $ret $body )*) } From 8d8a199f29aadddf89e42c689f0d7a8ef3711c20 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 5 Feb 2025 07:57:14 +0000 Subject: [PATCH 2/4] Disable `RUST_BACKTRACE` for FreeBSD CI Having this environment variable set causes a segfault [1]. Just disable backtraces for now. [1]: https://github.com/rust-lang/rust/issues/132185 --- .cirrus.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 656696c825752..7968772921d40 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,6 +3,9 @@ task: env: HOME: /tmp # cargo cache needs it TARGET: x86_64-unknown-freebsd + # FIXME(freebsd): FreeBSD has a segfault when `RUST_BACKTRACE` is set + # https://github.com/rust-lang/rust/issues/132185 + RUST_BACKTRACE: "0" matrix: - name: nightly freebsd-13 i686 # Test i686 FreeBSD in 32-bit emulation on a 64-bit host. From f691a1a52fd6df5c6a58b526ff568d4a17049212 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 5 Feb 2025 08:09:26 +0000 Subject: [PATCH 3/4] FreeBSD: Add the new `st_filerev` field to `stat32` for FreeBSD 15 This field appears to have been added recently [1]. [1]: https://github.com/freebsd/freebsd-src/commit/b4663a8d111767206bb3ebcfec5b95a6b88bc720 --- src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs index 638b7bc3352ad..11432df2ba4c2 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs @@ -266,7 +266,8 @@ s! { pub st_blksize: crate::blksize_t, pub st_flags: crate::fflags_t, pub st_gen: u64, - pub st_spare: [u64; 10], + pub st_filerev: u64, + pub st_spare: [u64; 9], } } From eb7045bd7e9744a980389fdbf95cc50880e67796 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 5 Feb 2025 10:09:46 +0000 Subject: [PATCH 4/4] Temporarily disable `powerpc-unknown-linux-gnu` tests As mentioned in [1], this test has started to fail for unclear reasons. Disable this until it can be investigated further. [1]: https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713 --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 580effd5b7bb8..beb5bfb12570f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -135,7 +135,9 @@ jobs: - i686-unknown-linux-musl - loongarch64-unknown-linux-gnu - loongarch64-unknown-linux-musl - - powerpc-unknown-linux-gnu + # FIXME(ppc): SIGILL running tests, see + # https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713 + # - powerpc-unknown-linux-gnu - powerpc64-unknown-linux-gnu - powerpc64le-unknown-linux-gnu - riscv64gc-unknown-linux-gnu