node: Fix conditions for socket activation

The implementation of socket activation requires not only the `systemd`
feature, but also `socket2`.
This commit is contained in:
Lorenz Leutgeb 2026-04-21 20:30:07 +02:00 committed by Fintan Halpenny
parent 354805aeb3
commit 4a81673d0e
1 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@ impl Runtime {
Ok(())
}
#[cfg(all(feature = "systemd", target_os = "linux"))]
#[cfg(all(feature = "socket2", feature = "systemd", target_os = "linux"))]
fn receive_listener() -> Option<UnixListener> {
// SAFETY: When `fd` is called, no other threads are spawned (yet).
let fd = match unsafe { radicle_systemd::listen::fd("control") } {
@ -352,7 +352,7 @@ impl Runtime {
}
fn bind(path: PathBuf) -> Result<ControlSocket, Error> {
#[cfg(all(feature = "systemd", target_os = "linux"))]
#[cfg(all(feature = "socket2", feature = "systemd", target_os = "linux"))]
{
if let Some(listener) = Self::receive_listener() {
log::info!(target: "node", "Received control socket.");