fix: build on haiku by adding missing import

This commit is contained in:
Steve Lau 2024-04-02 14:18:31 +08:00
parent 6bbd8c519a
commit 6ad96825fc

View File

@ -278,7 +278,7 @@ pub fn get_name() -> Option<CString> {
return None; return None;
} }
let info = tinfo.assume_init(); let info = tinfo.assume_init();
let name = slice::from_raw_parts(info.name.as_ptr() as *const u8, info.name.len()); let name = core::slice::from_raw_parts(info.name.as_ptr() as *const u8, info.name.len());
CStr::from_bytes_until_nul(name).map(CStr::to_owned).ok() CStr::from_bytes_until_nul(name).map(CStr::to_owned).ok()
} }
} }