From 6d2aaef098702f606a07bf55d50545d36a735a21 Mon Sep 17 00:00:00 2001 From: Soapux <2375-Soapux@users.noreply.gitlab.freedesktop.org> Date: Tue, 25 Mar 2025 16:07:55 -0500 Subject: [PATCH] build: check for audit support before adding AmbientCapabilities feature Currently the AmbientCapabilities are added even if meson didn't find audit or cap-ng. --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 3f4ad316..8dcbf618 100644 --- a/meson.build +++ b/meson.build @@ -574,7 +574,9 @@ else error('libaudit support requested but not found') endif # For the systemd system unit - data_config.set('AMBIENT_CAPS', 'AmbientCapabilities=CAP_AUDIT_WRITE') + if have_libaudit + data_config.set('AMBIENT_CAPS', 'AmbientCapabilities=CAP_AUDIT_WRITE') + endif endif config.set('HAVE_LIBAUDIT', have_libaudit)