about summary refs log tree commit diff
path: root/library/panic_unwind
diff options
context:
space:
mode:
authorChris Denton <chris@chrisdenton.dev>2024-03-09 02:03:22 +0000
committerChris Denton <chris@chrisdenton.dev>2024-04-14 07:11:51 +0000
commitb1f1039d8bd8ffdda6a58c37f248a247fd9a4e72 (patch)
tree01aa04e96eeecd051b475aab8fc2902dc382a123 /library/panic_unwind
parentf3c66088610c1b80110297c2d9a8b5f9265b013f (diff)
Replace libc::c_int with core::ffi::c_int
And remove the libc crate when it isn't needed
Diffstat (limited to 'library/panic_unwind')
-rw-r--r--library/panic_unwind/Cargo.toml4
-rw-r--r--library/panic_unwind/src/seh.rs2
2 files changed, 4 insertions, 2 deletions
diff --git a/library/panic_unwind/Cargo.toml b/library/panic_unwind/Cargo.toml
index 85386976d63..dce2da31644 100644
--- a/library/panic_unwind/Cargo.toml
+++ b/library/panic_unwind/Cargo.toml
@@ -14,7 +14,9 @@ doc = false
 [dependencies]
 alloc = { path = "../alloc" }
 core = { path = "../core" }
-libc = { version = "0.2", default-features = false }
 unwind = { path = "../unwind" }
 compiler_builtins = "0.1.0"
 cfg-if = "1.0"
+
+[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
+libc = { version = "0.2", default-features = false }
diff --git a/library/panic_unwind/src/seh.rs b/library/panic_unwind/src/seh.rs
index 6bc0559c88f..04c3d3bf9c3 100644
--- a/library/panic_unwind/src/seh.rs
+++ b/library/panic_unwind/src/seh.rs
@@ -48,9 +48,9 @@
 
 use alloc::boxed::Box;
 use core::any::Any;
+use core::ffi::{c_int, c_uint, c_void};
 use core::mem::{self, ManuallyDrop};
 use core::ptr::{addr_of, addr_of_mut};
-use libc::{c_int, c_uint, c_void};
 
 // NOTE(nbdd0121): The `canary` field is part of stable ABI.
 #[repr(C)]