Skip to content

Commit 4873220

Browse files
committed
fixup to "Fix the definition of several BPF related ioctls on 32-bit FreeBSD"
x86 is special, it turns out.
1 parent abd3494 commit 4873220

File tree

8 files changed

+15
-4
lines changed

8 files changed

+15
-4
lines changed

src/unix/bsd/freebsdlike/freebsd/aarch64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ cfg_if! {
134134
}
135135
}
136136

137+
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
138+
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
137139
pub const MAP_32BIT: ::c_int = 0x00080000;
138140
pub const MINSIGSTKSZ: ::size_t = 4096; // 1024 * 4
139141
pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;

src/unix/bsd/freebsdlike/freebsd/arm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ pub type suseconds_t = i32;
88
pub type register_t = i32;
99

1010
pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1;
11+
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
12+
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
1113
pub const MAP_32BIT: ::c_int = 0x00080000;
1214
pub const MINSIGSTKSZ: ::size_t = 4096; // 1024 * 4
1315
pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;

src/unix/bsd/freebsdlike/freebsd/powerpc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ pub type suseconds_t = i32;
88
pub type register_t = i32;
99

1010
pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1;
11+
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
12+
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
1113
pub const MAP_32BIT: ::c_int = 0x00080000;
1214
pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4
1315
pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;

src/unix/bsd/freebsdlike/freebsd/powerpc64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ pub type suseconds_t = i64;
88
pub type register_t = i64;
99

1010
pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
11+
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
12+
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
1113
pub const MAP_32BIT: ::c_int = 0x00080000;
1214
pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4
1315
pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;

src/unix/bsd/freebsdlike/freebsd/riscv64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ cfg_if! {
142142
}
143143
}
144144

145+
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
146+
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
145147
pub const MAP_32BIT: ::c_int = 0x00080000;
146148
pub const MINSIGSTKSZ: ::size_t = 4096; // 1024 * 4
147149
pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;

src/unix/bsd/freebsdlike/freebsd/x86.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,7 @@ cfg_if! {
168168

169169
pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4
170170

171+
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8008426d;
172+
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4008426e;
171173
pub const KINFO_FILE_SIZE: ::c_int = 1392;
172174
pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459;

src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ cfg_if! {
221221

222222
pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
223223

224+
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
225+
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
226+
224227
pub const MAP_32BIT: ::c_int = 0x00080000;
225228
pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4
226229

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,14 +1281,10 @@ pub const BIOCSSEESENT: ::c_ulong = 0x80044277;
12811281
cfg_if! {
12821282
if #[cfg(target_pointer_width = "64")] {
12831283
pub const BIOCGDLTLIST: ::c_ulong = 0xc0104279;
1284-
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
12851284
pub const BIOCSETF: ::c_ulong = 0x80104267;
1286-
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
12871285
} else if #[cfg(target_pointer_width = "32")] {
12881286
pub const BIOCGDLTLIST: ::c_ulong = 0xc0084279;
1289-
pub const BIOCGRTIMEOUT: ::c_ulong = 0x4008426e;
12901287
pub const BIOCSETF: ::c_ulong = 0x80084267;
1291-
pub const BIOCSRTIMEOUT: ::c_ulong = 0x8008426d;
12921288
}
12931289
}
12941290

0 commit comments

Comments
 (0)