Skip to content

Commit 70511f2

Browse files
asomerstgross35
authored andcommitted
Fix definition of FIODGNAME on 32-bit FreeBSD
https://github.com/freebsd/freebsd-src/blob/main/sys/sys/filio.h (backport <rust-lang#3948>) (cherry picked from commit 0b6cab8)
1 parent bbd5e27 commit 70511f2

File tree

1 file changed

+8
-1
lines changed
  • src/unix/bsd/freebsdlike/freebsd

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3218,7 +3218,14 @@ cfg_if! {
32183218
}
32193219
}
32203220

3221-
pub const FIODGNAME: ::c_ulong = 0x80106678;
3221+
cfg_if! {
3222+
if #[cfg(target_pointer_width = "64")] {
3223+
pub const FIODGNAME: ::c_ulong = 0x80106678;
3224+
} else {
3225+
pub const FIODGNAME: ::c_ulong = 0x80086678;
3226+
}
3227+
}
3228+
32223229
pub const FIONWRITE: ::c_ulong = 0x40046677;
32233230
pub const FIONSPACE: ::c_ulong = 0x40046676;
32243231
pub const FIOSEEKDATA: ::c_ulong = 0xc0086661;

0 commit comments

Comments
 (0)