Skip to content

Commit

Permalink
Merge pull request #377 from oleiade/fix/freebsd-build
Browse files Browse the repository at this point in the history
Fix FreeBSD compiler error
  • Loading branch information
stanislav-tkach authored Mar 21, 2024
2 parents 773d319 + 3147a61 commit c6f8294
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions os_info/src/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{bitness, uname::uname, Info, Type, Version};
pub fn current_platform() -> Info {
trace!("freebsd::current_platform is called");

let version = uname("-s")
let version = uname("-r")
.map(Version::from_string)
.unwrap_or_else(|| Version::Unknown);

Expand All @@ -25,8 +25,8 @@ pub fn current_platform() -> Info {

fn get_os() -> Type {
match uname("-s").as_deref() {
"MidnightBSD" => Type::MidnightBSD,
"FreeBSD" => {
Some("MidnightBSD") => Type::MidnightBSD,
Some("FreeBSD") => {
let check_hardening = match Command::new("/sbin/sysctl")
.arg("hardening.version")
.output()
Expand Down

0 comments on commit c6f8294

Please sign in to comment.