Mercurial > crates > systemd-socket
diff Cargo.toml @ 16:bc76507dd878
Fixed conditional compilation based on OS
A mistake was causing systemd to never enable and the tests were too
clever to detect that. Not sure what to do with it.
author | Martin Habovstiak <martin.habovstiak@gmail.com> |
---|---|
date | Tue, 22 Dec 2020 13:58:47 +0100 |
parents | 2039b5d39d72 |
children | 77dc1c45b424 |
line wrap: on
line diff
--- a/Cargo.toml Tue Dec 22 13:56:56 2020 +0100 +++ b/Cargo.toml Tue Dec 22 13:58:47 2020 +0100 @@ -17,10 +17,12 @@ [features] default = ["enable_systemd"] serde = ["serde_crate", "serde_str_helpers"] -enable_systemd = [] +enable_systemd = ["libsystemd"] -[target.'cfg(all(target_os = "linux", feature = "enable_systemd"))'.dependencies] -libsystemd = "0.2.1" +[target.'cfg(target_os = "linux")'.dependencies] +# WARNING: It is NOT guaranteed that this crate will always use libsystemd as dependency! +# This as a feature is not considered a public interface! +libsystemd = { version = "0.2.1", optional = true } [dependencies] thiserror = "1.0.21"