about summary refs log tree commit diff
path: root/library/unwind/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/unwind/src/lib.rs')
-rw-r--r--library/unwind/src/lib.rs4
1 files changed, 4 insertions, 0 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