Skip to content

Commit af7648a

Browse files
committed
ci: downgrade libc for hurd
1 parent 3646cb9 commit af7648a

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.github/workflows/check_new_changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99

1010
jobs:
1111
check_new_changelog:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
steps:
1414
- name: checkout
1515
uses: actions/checkout@v4

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,7 @@ jobs:
7878
# Use cross for QEMU-based testing
7979
# cross needs to execute Docker, GitHub Action already has it installed
8080
cross:
81-
# Still use 20.04 for this CI step as test `test_prctl::test_set_vma_anon_name`
82-
# would fail on 22.04 and 24.04 (at least for now)
83-
# https://github.com/nix-rust/nix/issues/2418
84-
runs-on: ubuntu-20.04
81+
runs-on: ubuntu-24.04
8582
needs: [rustfmt, minver, macos, x86_64_linux_native_builds, rust_stable]
8683
strategy:
8784
fail-fast: false
@@ -363,6 +360,13 @@ jobs:
363360
- name: install src
364361
run: rustup component add rust-src
365362

363+
# Cargo uses the latest version of libc(without lock file), which is, at the time of writing
364+
# this, 0.2.172. And the hurd target is broken with 0.2.172: https://github.com/rust-lang/libc/issues/4421
365+
# So we need to downgrade it.
366+
- name: downgrade libc to 0.2.171 on hurd
367+
if: ${{ matrix.target == 'i686-unknown-hurd-gnu' }}
368+
run: cargo update -p libc --precise 0.2.171
369+
366370
- name: build
367371
uses: ./.github/actions/build
368372
with:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ targets = [
2828
]
2929

3030
[dependencies]
31-
libc = { version = "=0.2.171", features = ["extra_traits"] }
31+
libc = { version = "0.2.171", features = ["extra_traits"] }
3232
bitflags = "2.3.3"
3333
cfg-if = "1.0"
3434
pin-utils = { version = "0.1.0", optional = true }

test/sys/test_prctl.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ mod test_prctl {
131131
prctl::set_thp_disable(original).unwrap();
132132
}
133133

134+
// Ignore this test under QEMU, as it started failing after updating the Linux CI
135+
// runner image, for reasons unknown.
136+
//
137+
// See: https://github.com/nix-rust/nix/issues/2418
134138
#[test]
139+
#[cfg_attr(qemu, ignore)]
135140
fn test_set_vma_anon_name() {
136141
use nix::errno::Errno;
137142
use nix::sys::mman;

0 commit comments

Comments
 (0)