From b10c09750495bee3fc4b8aa9de39abc668bd4ad7 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 3 Mar 2021 20:07:43 -0500 Subject: fix build on windows Signed-off-by: Christine Dodrill --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 91cd12b..e39c822 100644 --- a/src/main.rs +++ b/src/main.rs @@ -207,6 +207,8 @@ async fn main() -> Result<()> { .with(warp::log(APPLICATION_NAME)) .recover(handlers::rejection); + #[cfg(linux)] + { match sdnotify::SdNotify::from_env() { Ok(ref mut n) => { // shitty heuristic for detecting if we're running in prod @@ -227,7 +229,7 @@ async fn main() -> Result<()> { })?; } Err(why) => error!("not running under systemd with Type=notify: {}", why), - } + }} warp::serve(site) .run(( -- cgit v1.2.3