systemd: Require Linux for journal module
The dependency `systemd-journal-logger` does not build on macOS, and there are no tests for other Unixes. Also, systemd is most common on Linux. To avoid compilation errors on non-Linux platforms, only depend on the crate when building on Linux. Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.xyz>
This commit is contained in:
parent
e70850cb36
commit
9793b4e7b6
|
|
@ -10,6 +10,8 @@ rust-version.workspace = true
|
|||
|
||||
[dependencies]
|
||||
log = { workspace = true, optional = true }
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
systemd-journal-logger = { version = "2.2.2", optional = true }
|
||||
|
||||
[features]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//! Library for interaction with systemd, specialized for Radicle.
|
||||
|
||||
#[cfg(feature = "journal")]
|
||||
#[cfg(all(feature = "journal", target_os = "linux"))]
|
||||
pub mod journal;
|
||||
|
||||
#[cfg(feature = "listen")]
|
||||
|
|
|
|||
Loading…
Reference in New Issue