lib: fix aarch64 build by casting UtsNameBuf field pointers to c_char (#55)

This commit is contained in:
Amaan Qureshi 2026-03-26 15:43:40 -04:00 committed by GitHub
commit 1dd02def4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()) }
} }
} }