Implement socket activation without libsystemd

Socket activation uses sd_listen_fds from libsystemd, and can only be
compiled on systems with systemd.

This is an issue for Alpine / postmarketOS, where upstream has no
systemd package, but downstream depends on upstream's pipewire package
and wants to rely on socket activation. This also prevents using
socket-activation on other non-systemd distributions, including
non-Linux.

Implement equivalent functionality without a dependency on libsystemd.
This commit is contained in:
Hugo Osvaldo Barrera 2026-02-02 22:16:11 +01:00
parent 2c0988ab4c
commit 57efceeb02
4 changed files with 82 additions and 30 deletions

View file

@ -276,10 +276,6 @@ pipewire_module_link_factory = shared_library('pipewire-module-link-factory',
pipewire_module_protocol_deps = [mathlib, dl_lib, pipewire_dep]
if systemd_dep.found()
pipewire_module_protocol_deps += systemd_dep
endif
if selinux_dep.found()
pipewire_module_protocol_deps += selinux_dep
endif