diff --git a/src/string/src/lib.rs b/src/string/src/lib.rs index ca56dff0011bfac9dd88e78b810a6172d812e865..9c89220184c12173855d7bb67a9d8f1da8c9c91e 100644 --- a/src/string/src/lib.rs +++ b/src/string/src/lib.rs @@ -8,6 +8,8 @@ extern crate errno; extern crate platform; extern crate stdlib; +pub use compiler_builtins::mem::*; + use platform::types::*; use errno::*; use core::cmp; @@ -125,7 +127,7 @@ pub unsafe extern "C" fn strcspn(s1: *const c_char, s2: *const c_char) -> c_ulon // The below logic is effectively ripped from the musl implementation - let mut byteset = [0u8; 32 / mem::size_of::<usize>()]; + let mut byteset = [0usize; 32 / mem::size_of::<usize>()]; let mut i = 0; while *s2.offset(i) != 0 { @@ -277,7 +279,7 @@ pub unsafe extern "C" fn strspn(s1: *const c_char, s2: *const c_char) -> c_ulong // The below logic is effectively ripped from the musl implementation - let mut byteset = [0u8; 32 / mem::size_of::<usize>()]; + let mut byteset = [0usize; 32 / mem::size_of::<usize>()]; let mut i = 0; while *s2.offset(i) != 0 {