From 453b53a388900b620d3c52fc5e909da047498ec2 Mon Sep 17 00:00:00 2001 From: Delta 4 <156182500+delta4chat@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:02:13 +0800 Subject: [PATCH 1/2] fixes https://github.com/quinn-rs/quinn/issues/2033 --- quinn-udp/src/unix.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/quinn-udp/src/unix.rs b/quinn-udp/src/unix.rs index 252e6f719..b8ff6e592 100644 --- a/quinn-udp/src/unix.rs +++ b/quinn-udp/src/unix.rs @@ -445,7 +445,12 @@ fn send(state: &UdpSocketState, io: SockRef<'_>, transmit: &Transmit<'_>) -> io: Ok(()) } -#[cfg(not(any(apple, target_os = "openbsd", target_os = "solaris")))] +#[cfg(not(any( + apple, + target_os = "openbsd", + target_os = "netbsd", + target_os = "solaris" +)))] fn recv(io: SockRef<'_>, bufs: &mut [IoSliceMut<'_>], meta: &mut [RecvMeta]) -> io::Result { let mut names = [MaybeUninit::::uninit(); BATCH_SIZE]; let mut ctrls = [cmsg::Aligned(MaybeUninit::<[u8; CMSG_LEN]>::uninit()); BATCH_SIZE]; From 25478d7052a5ee07a30d9e606c6bf90627d17704 Mon Sep 17 00:00:00 2001 From: Delta 4 <156182500+delta4chat@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:54:41 +0800 Subject: [PATCH 2/2] CI: add test for netbsd --- .github/workflows/rust.yml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cecfae37a..e9af88327 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,11 +26,40 @@ jobs: pkg install -y curl curl https://sh.rustup.rs -sSf --output rustup.sh sh rustup.sh -y --profile minimal --default-toolchain stable - echo "~~~~ rustc --version ~~~~" - $HOME/.cargo/bin/rustc --version - echo "~~~~ freebsd-version ~~~~" + run: | + export PATH="$HOME/.cargo/bin:$PATH" + echo "===== rustc --version =====" + rustc --version + echo "===== freebsd-version =====" freebsd-version - run: $HOME/.cargo/bin/cargo build --all-targets && $HOME/.cargo/bin/cargo test && $HOME/.cargo/bin/cargo test --manifest-path fuzz/Cargo.toml && $HOME/.cargo/bin/cargo test -p quinn-udp --benches + + cargo build --all-targets && cargo test && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p quinn-udp --benches + + test-netbsd: + name: test on netbsd + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: test on netbsd + uses: vmactions/netbsd-vm@v1 + with: + usesh: true + mem: 4096 + copyback: false + prepare: | + export PATH="/usr/sbin:/sbin:$PATH" + pkg_add curl + curl https://sh.rustup.rs -sSf --output rustup.sh + sh rustup.sh -y --profile minimal --default-toolchain stable + run: | + export PATH="$HOME/.cargo/bin:$PATH" + echo "===== rustc --version =====" + rustc --version + echo "===== uname -a =====" + uname -a + + cargo build --all-targets && cargo test && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p quinn-udp --benches + test: strategy: matrix: