mirror of
https://github.com/NotAShelf/microfetch.git
synced 2026-04-13 05:13:50 +00:00
lib: fix aarch64 build by casting UtsNameBuf field pointers to c_char
This commit is contained in:
parent
0c294d348b
commit
0c09818abe
1 changed files with 4 additions and 4 deletions
|
|
@ -28,21 +28,21 @@ impl UtsName {
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn nodename(&self) -> &CStr {
|
pub const fn nodename(&self) -> &CStr {
|
||||||
unsafe { CStr::from_ptr(self.0.nodename.as_ptr()) }
|
unsafe { CStr::from_ptr(self.0.nodename.as_ptr().cast()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn sysname(&self) -> &CStr {
|
pub const fn sysname(&self) -> &CStr {
|
||||||
unsafe { CStr::from_ptr(self.0.sysname.as_ptr()) }
|
unsafe { CStr::from_ptr(self.0.sysname.as_ptr().cast()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn release(&self) -> &CStr {
|
pub const fn release(&self) -> &CStr {
|
||||||
unsafe { CStr::from_ptr(self.0.release.as_ptr()) }
|
unsafe { CStr::from_ptr(self.0.release.as_ptr().cast()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn machine(&self) -> &CStr {
|
pub const fn machine(&self) -> &CStr {
|
||||||
unsafe { CStr::from_ptr(self.0.machine.as_ptr()) }
|
unsafe { CStr::from_ptr(self.0.machine.as_ptr().cast()) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue