Support building for Redox
This commit is contained in:
+1
-10
@@ -104,16 +104,7 @@ pub extern "C" fn strerror(errnum: c_int) -> *mut c_char {
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn strlen(s: *const c_char) -> size_t {
|
||||
let mut size = 0;
|
||||
|
||||
loop {
|
||||
if *s.offset(size) == 0 {
|
||||
break;
|
||||
}
|
||||
size += 1;
|
||||
}
|
||||
|
||||
size as size_t
|
||||
platform::c_str(s).len() as size_t
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
||||
Reference in New Issue
Block a user