From e3df4b42da6d9194ca99907b880333c352f9b505 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 28 Oct 2018 21:55:26 +0100 Subject: [PATCH] OS detection: Treat BSDs as "osx" Since macOS is also a BSD under the hood, this will probably yield better results. --- src/main.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 422152ad..a90dd079 100644 --- a/src/main.rs +++ b/src/main.rs @@ -199,12 +199,21 @@ fn get_os() -> OsType { OsType::Linux } -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "dragonfly"))] fn get_os() -> OsType { OsType::OsX } -#[cfg(not(any(target_os = "linux", target_os = "macos")))] +#[cfg(not(any(target_os = "linux", + target_os = "macos", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd", + target_os = "dragonfly")))] fn get_os() -> OsType { OsType::Other }