about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index ba6e89cdd76..3de77b05228 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -69,6 +69,8 @@
 
 #[macro_use]
 extern crate core;
+
+#[cfg(all(not(external_funcs), not(external_crate)))]
 extern crate libc;
 
 // Allow testing this library