mirror of
https://github.com/NotAShelf/microfetch.git
synced 2026-04-12 21:07:41 +00:00
lib: fix aarch64 build by casting UtsNameBuf field pointers to c_char (#55)
This commit is contained in:
parent
0c294d348b
commit
1dd02def4b
1 changed files with 4 additions and 4 deletions
|
|
@ -28,21 +28,21 @@ impl UtsName {
|
|||
|
||||
#[must_use]
|
||||
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]
|
||||
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]
|
||||
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]
|
||||
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