use crate::host;
use crate::to_str;
#[cfg(target_os = "linux")]
use libc::utsname;
use std::io::Error;
pub fn get_kernel_version() -> Result<String, Error> {
let x = host::get_uname()?;
Ok(to_str(x.release.as_ptr()).to_owned())
}
#[cfg(target_os = "linux")]
#[inline]
pub(crate) fn get_kernel_version_from_uname(uts: &utsname) -> String {
to_str(uts.release.as_ptr()).to_owned()
}