From 2459576f524a5b42afcabdd79c19ff1e55cbcfda Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Thu, 17 Aug 2023 23:46:34 -0400 Subject: [PATCH] Fix compilation on windows --- src/lib.rs | 2 +- src/main.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b02473b..85b71dd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,7 +20,7 @@ pub mod websocket; #[cfg(any(feature = "s2s-incoming", feature = "outgoing"))] pub mod verify; -#[cfg(feature = "nix")] +#[cfg(all(feature = "nix", not(target_os = "windows")))] pub mod systemd; pub mod context; diff --git a/src/main.rs b/src/main.rs index 3f24fea..1b10038 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ #![deny(clippy::all)] use anyhow::Result; use die::{die, Die}; -use log::{debug, error, info}; +use log::{debug, info}; use serde_derive::Deserialize; use std::{ ffi::OsString, @@ -97,7 +97,7 @@ fn spawn_refresh_task(certs_key: &'static CertsKey, cfg_path: OsString) -> Optio info!("reloaded cert/key successfully!"); } } - Err(e) => error!("invalid config/cert/key on SIGHUP: {}", e), + Err(e) => log::error!("invalid config/cert/key on SIGHUP: {}", e), }; } })) @@ -148,7 +148,7 @@ async fn main() { outgoing_listen.push(TcpListener::bind(a).await.die("cannot listen on port/interface")); } - #[cfg(feature = "nix")] + #[cfg(all(feature = "nix", not(target_os = "windows")))] if let Ok(fds) = xmpp_proxy::systemd::receive_descriptors_with_names(true) { use xmpp_proxy::systemd::Listener; for fd in fds {