diff options
Diffstat (limited to 'library/unwind/src')
| -rw-r--r-- | library/unwind/src/lib.rs | 4 | ||||
| -rw-r--r-- | library/unwind/src/libunwind.rs | 2 | ||||
| -rw-r--r-- | library/unwind/src/unwinding.rs | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs index 51d31a00afe..544d9fbf1ae 100644 --- a/library/unwind/src/lib.rs +++ b/library/unwind/src/lib.rs @@ -12,6 +12,10 @@ )] #![allow(internal_features)] +// Force libc to be included even if unused. This is required by many platforms. +#[cfg(not(all(windows, target_env = "msvc")))] +extern crate libc as _; + cfg_if::cfg_if! { if #[cfg(target_env = "msvc")] { // Windows MSVC no extra unwinder support needed diff --git a/library/unwind/src/libunwind.rs b/library/unwind/src/libunwind.rs index 57ce3d0fa5c..e34e73a3516 100644 --- a/library/unwind/src/libunwind.rs +++ b/library/unwind/src/libunwind.rs @@ -1,6 +1,6 @@ #![allow(nonstandard_style)] -use libc::{c_int, c_void}; +use core::ffi::{c_int, c_void}; #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq)] diff --git a/library/unwind/src/unwinding.rs b/library/unwind/src/unwinding.rs index 95e2eb000cc..083acaeb56a 100644 --- a/library/unwind/src/unwinding.rs +++ b/library/unwind/src/unwinding.rs @@ -1,6 +1,6 @@ #![allow(nonstandard_style)] -use libc::{c_int, c_void}; +use core::ffi::{c_int, c_void}; #[repr(C)] #[derive(Copy, Clone, PartialEq)] |
