Skip to content

Commit 1c27152

Browse files
committed
Fix Windows build: expose EOVERFLOW, SIGSEGV, SIGFPE on Windows
host_mmap::EOVERFLOW and host_faulthandler::{SIGSEGV, SIGFPE} re-exports were gated to cfg(unix) but stdlib uses them from Windows and platform-agnostic code paths.
1 parent 75388ab commit 1c27152

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎crates/host_env/src/faulthandler.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ use alloc::vec::Vec;
1414
use parking_lot::Mutex;
1515

1616
#[cfg(unix)]
17-
pub use libc::{SA_NODEFER, SIGFPE, SIGSEGV, c_int};
17+
pub use libc::{SA_NODEFER, c_int};
18+
pub use libc::{SIGFPE, SIGSEGV};
1819
#[cfg(windows)]
1920
use windows_sys::Win32::System::{
2021
Diagnostics::Debug::{

‎crates/host_env/src/mmap.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ pub use libc::MAP_STACK;
5959
#[cfg(target_os = "freebsd")]
6060
pub use libc::{MADV_AUTOSYNC, MADV_CORE, MADV_NOCORE, MADV_NOSYNC, MADV_PROTECT};
6161

62-
#[cfg(unix)]
6362
pub use libc::EOVERFLOW;
6463

6564
#[cfg(windows)]

0 commit comments

Comments
 (0)