Index: libc/src/lib.rs =================================================================== --- a/src/lib.rs +++ b/src/lib.rs @@ -30,6 +30,10 @@ )] #![cfg_attr(libc_const_extern_fn, feature(const_extern_fn))] +// ANDROID: Use std to allow building as a dylib. +#[cfg(android_dylib)] +extern crate std; + #[macro_use] mod macros;