Skip to content

Commit 84b6565

Browse files
committed
Increase size of cpuset_t on FreeBSD 14
See freebsd/freebsd-src@d1639e4
1 parent 01bfa0c commit 84b6565

File tree

1 file changed

+13
-3
lines changed
  • src/unix/bsd/freebsdlike/freebsd

1 file changed

+13
-3
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,13 @@ s! {
365365
}
366366

367367
pub struct cpuset_t {
368-
#[cfg(target_pointer_width = "64")]
368+
#[cfg(all(freebsd14, target_pointer_width = "64"))]
369+
__bits: [::c_long; 16],
370+
#[cfg(all(freebsd14, target_pointer_width = "32"))]
371+
__bits: [::c_long; 32],
372+
#[cfg(all(not(freebsd14), target_pointer_width = "64"))]
369373
__bits: [::c_long; 4],
370-
#[cfg(target_pointer_width = "32")]
374+
#[cfg(all(not(freebsd14), target_pointer_width = "32"))]
371375
__bits: [::c_long; 8],
372376
}
373377

@@ -2615,7 +2619,13 @@ pub const DEVSTAT_N_TRANS_FLAGS: ::c_int = 4;
26152619
pub const DEVSTAT_NAME_LEN: ::c_int = 16;
26162620

26172621
// sys/cpuset.h
2618-
pub const CPU_SETSIZE: ::c_int = 256;
2622+
cfg_if! {
2623+
if #[cfg(freebsd14)] {
2624+
pub const CPU_SETSIZE: ::c_int = 1024;
2625+
} else {
2626+
pub const CPU_SETSIZE: ::c_int = 256;
2627+
}
2628+
}
26192629

26202630
pub const SIGEV_THREAD_ID: ::c_int = 4;
26212631

0 commit comments

Comments
 (0)