Fix compilation on windows
Some checks failed
moparisthebest/xmpp-proxy/pipeline/head There was a failure building this commit
Some checks failed
moparisthebest/xmpp-proxy/pipeline/head There was a failure building this commit
This commit is contained in:
parent
d34ab513e9
commit
2459576f52
@ -20,7 +20,7 @@ pub mod websocket;
|
|||||||
#[cfg(any(feature = "s2s-incoming", feature = "outgoing"))]
|
#[cfg(any(feature = "s2s-incoming", feature = "outgoing"))]
|
||||||
pub mod verify;
|
pub mod verify;
|
||||||
|
|
||||||
#[cfg(feature = "nix")]
|
#[cfg(all(feature = "nix", not(target_os = "windows")))]
|
||||||
pub mod systemd;
|
pub mod systemd;
|
||||||
|
|
||||||
pub mod context;
|
pub mod context;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#![deny(clippy::all)]
|
#![deny(clippy::all)]
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use die::{die, Die};
|
use die::{die, Die};
|
||||||
use log::{debug, error, info};
|
use log::{debug, info};
|
||||||
use serde_derive::Deserialize;
|
use serde_derive::Deserialize;
|
||||||
use std::{
|
use std::{
|
||||||
ffi::OsString,
|
ffi::OsString,
|
||||||
@ -97,7 +97,7 @@ fn spawn_refresh_task(certs_key: &'static CertsKey, cfg_path: OsString) -> Optio
|
|||||||
info!("reloaded cert/key successfully!");
|
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"));
|
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) {
|
if let Ok(fds) = xmpp_proxy::systemd::receive_descriptors_with_names(true) {
|
||||||
use xmpp_proxy::systemd::Listener;
|
use xmpp_proxy::systemd::Listener;
|
||||||
for fd in fds {
|
for fd in fds {
|
||||||
|
Loading…
Reference in New Issue
Block a user