aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2021-03-03 20:07:43 -0500
committerChristine Dodrill <me@christine.website>2021-03-03 20:07:43 -0500
commitb10c09750495bee3fc4b8aa9de39abc668bd4ad7 (patch)
tree52b781c8a31ff3c391cc149666990d7458406ca0 /src/main.rs
parentd978995f7925f7680d880077e8c046a68245758d (diff)
downloadxesite-b10c09750495bee3fc4b8aa9de39abc668bd4ad7.tar.xz
xesite-b10c09750495bee3fc4b8aa9de39abc668bd4ad7.zip
fix build on windows
Signed-off-by: Christine Dodrill <me@christine.website>
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
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((