diff --git a/src/lib.rs b/src/lib.rs | |
index 1b6f0c07..dd9b9df1 100644 | |
--- a/src/lib.rs | |
+++ b/src/lib.rs | |
@@ -24,6 +24,10 @@ | |
#![cfg_attr(feature = "rustc-dep-of-std", no_core)] | |
#![cfg_attr(libc_const_extern_fn_unstable, feature(const_extern_fn))] | |
+// ANDROID: Use std to allow building as a dylib. | |
+#[cfg(android_dylib)] | |
+extern crate std; | |
+ | |
#[macro_use] | |
mod macros; | |