From 9ed836d0286b044a69c39be6204fadb9ea2baaf6 Mon Sep 17 00:00:00 2001 From: c0repwn3r Date: Wed, 12 Jul 2023 11:47:38 -0400 Subject: [PATCH] enable netbsd compilation --- tfclient/src/dirs.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tfclient/src/dirs.rs b/tfclient/src/dirs.rs index c9e2317..6495d0d 100644 --- a/tfclient/src/dirs.rs +++ b/tfclient/src/dirs.rs @@ -1,9 +1,10 @@ use std::path::PathBuf; -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "netbsd"))] pub fn config_base() -> PathBuf { PathBuf::from("/etc/tfclient") } + #[cfg(target_os = "windows")] pub fn config_base() -> PathBuf { PathBuf::from("C:\\Program Data\\e3team\\tfclient") @@ -24,8 +25,6 @@ pub fn config_base() -> PathBuf { compile_error!("tfclient cannot be compiled for dragonfly"); #[cfg(target_os = "openbsd")] compile_error!("tfclient cannot be compiled for openbsd"); -#[cfg(target_os = "netbsd")] -compile_error!("tfclient cannot be compiled for netbsd"); pub fn config_dir(instance: &str) -> PathBuf { config_base().join(format!("{}/", instance)) @@ -41,4 +40,4 @@ pub fn tfdata_toml(instance: &str) -> PathBuf { pub fn nebula_yml(instance: &str) -> PathBuf { config_base().join(format!("{}/", instance)).join("nebula.yml") -} \ No newline at end of file +}