Skip to content

Commit 01ce562

Browse files
authored
Merge pull request #4051 from tgross35/stable-ci
[0.2] ci: Remove tests with rust < 1.63
2 parents 8153ac1 + 6093ce0 commit 01ce562

File tree

3 files changed

+46
-112
lines changed

3 files changed

+46
-112
lines changed

.github/workflows/full_ci.yml

+10-17
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,7 @@ jobs:
3333
- stable
3434
- beta
3535
- nightly
36-
# FIXME: Disabled due to:
37-
# error: failed to parse registry's information for: serde
38-
# 1.13.0,
39-
- 1.19.0
40-
- 1.24.0
41-
- 1.25.0
42-
- 1.30.0
36+
- 1.63.0
4337
steps:
4438
- uses: actions/checkout@v4
4539
- name: Setup Rust toolchain
@@ -57,9 +51,10 @@ jobs:
5751
max-parallel: 4
5852
matrix:
5953
target:
60-
- { toolchain: stable, os: macos-13 }
61-
- { toolchain: beta, os: macos-13 }
62-
- { toolchain: nightly, os: macos-13 }
54+
- { toolchain: stable, os: macos-14 }
55+
- { toolchain: beta, os: macos-14 }
56+
- { toolchain: nightly, os: macos-14 }
57+
- { toolchain: 1.63.0, os: macos-14 }
6358
runs-on: ${{ matrix.target.os }}
6459
steps:
6560
- uses: actions/checkout@v4
@@ -77,10 +72,7 @@ jobs:
7772
fail-fast: true
7873
matrix:
7974
toolchain:
80-
- 1.19.0
81-
- 1.24.0
82-
- 1.25.0
83-
- 1.30.0
75+
- 1.63.0
8476
- stable
8577
steps:
8678
- uses: actions/checkout@v4
@@ -93,12 +85,12 @@ jobs:
9385

9486
macos:
9587
name: macOS
96-
runs-on: macos-13
88+
runs-on: macos-14
9789
strategy:
9890
fail-fast: true
9991
matrix:
10092
target:
101-
- x86_64-apple-darwin
93+
- aarch64-apple-darwin
10294
steps:
10395
- uses: actions/checkout@v4
10496
- name: Setup Rust toolchain
@@ -120,6 +112,7 @@ jobs:
120112
ARCH_BITS: 64
121113
ARCH: x86_64
122114
- target: x86_64-pc-windows-msvc
115+
# FIXME: It currently causes segfaults.
123116
#- target: i686-pc-windows-gnu
124117
# env:
125118
# ARCH_BITS: 32
@@ -220,7 +213,7 @@ jobs:
220213
run: |
221214
export PATH=$HOME/.rust_solaris/bin:$PATH
222215
bash ./ci/run.sh ${{ matrix.target }}
223-
216+
224217
check_cfg:
225218
name: "Check #[cfg]s"
226219
runs-on: ubuntu-22.04

.github/workflows/main.yml

-86
This file was deleted.

src/unix/bsd/apple/mod.rs

+36-9
Original file line numberDiff line numberDiff line change
@@ -1143,15 +1143,6 @@ s! {
11431143
pub nativeattr: attribute_set_t,
11441144
}
11451145

1146-
#[cfg_attr(libc_packedN, repr(packed(4)))]
1147-
pub struct ifconf {
1148-
pub ifc_len: ::c_int,
1149-
#[cfg(libc_union)]
1150-
pub ifc_ifcu: __c_anonymous_ifc_ifcu,
1151-
#[cfg(not(libc_union))]
1152-
pub ifc_ifcu: *mut ifreq,
1153-
}
1154-
11551146
#[cfg_attr(libc_align, repr(align(8)))]
11561147
pub struct tcp_connection_info {
11571148
pub tcpi_state: u8,
@@ -1202,6 +1193,15 @@ s! {
12021193
}
12031194

12041195
s_no_extra_traits! {
1196+
#[cfg_attr(libc_packedN, repr(packed(4)))]
1197+
pub struct ifconf {
1198+
pub ifc_len: ::c_int,
1199+
#[cfg(libc_union)]
1200+
pub ifc_ifcu: __c_anonymous_ifc_ifcu,
1201+
#[cfg(not(libc_union))]
1202+
pub ifc_ifcu: *mut ifreq,
1203+
}
1204+
12051205
#[cfg_attr(libc_packedN, repr(packed(4)))]
12061206
pub struct kevent {
12071207
pub ident: ::uintptr_t,
@@ -1617,6 +1617,32 @@ cfg_if! {
16171617

16181618
cfg_if! {
16191619
if #[cfg(feature = "extra_traits")] {
1620+
impl PartialEq for ifconf
1621+
where
1622+
Self: Copy
1623+
{
1624+
fn eq(&self, other: &Self) -> bool {
1625+
let len_ptr1 = core::ptr::addr_of!(self.ifc_len);
1626+
let len_ptr2 = core::ptr::addr_of!(other.ifc_len);
1627+
let ifcu_ptr1 = core::ptr::addr_of!(self.ifc_ifcu);
1628+
let ifcu_ptr2 = core::ptr::addr_of!(other.ifc_ifcu);
1629+
1630+
// SAFETY: `ifconf` implements `Copy` so the reads are valid
1631+
let len1 = unsafe { len_ptr1.read_unaligned() };
1632+
let len2 = unsafe { len_ptr2.read_unaligned() };
1633+
let ifcu1 = unsafe { ifcu_ptr1.read_unaligned() };
1634+
let ifcu2 = unsafe { ifcu_ptr2.read_unaligned() };
1635+
1636+
len1 == len2 && ifcu1 == ifcu2
1637+
}
1638+
}
1639+
impl Eq for ifconf {}
1640+
impl ::fmt::Debug for ifconf {
1641+
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
1642+
f.debug_struct("ifconf").finish_non_exhaustive()
1643+
}
1644+
}
1645+
16201646
impl PartialEq for kevent {
16211647
fn eq(&self, other: &kevent) -> bool {
16221648
self.ident == other.ident
@@ -1627,6 +1653,7 @@ cfg_if! {
16271653
&& self.udata == other.udata
16281654
}
16291655
}
1656+
16301657
impl Eq for kevent {}
16311658
impl ::fmt::Debug for kevent {
16321659
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {

0 commit comments

Comments
 (0)