]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared: conditionalize build of apparmor-util.c in meson
authorMike Yuan <me@yhndnzj.com>
Mon, 16 Feb 2026 01:50:29 +0000 (02:50 +0100)
committerMike Yuan <me@yhndnzj.com>
Mon, 16 Feb 2026 08:44:53 +0000 (09:44 +0100)
src/shared/apparmor-util.c
src/shared/meson.build

index 22e7d2d90d4442d25df9365364b19159f30f9693..10b57c60901d86f58db164cf6a1f986bcb2300b8 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#if HAVE_APPARMOR
-
 #include <syslog.h>
 
 #include "alloc-util.h"
@@ -67,4 +65,3 @@ bool mac_apparmor_use(void) {
 
         return (cached_use = true);
 }
-#endif
index fea5e22109f8f23b012f9bc16538f1f601deeaaa..b9630bef657875a69e0e549b5342301f07349540 100644 (file)
@@ -3,7 +3,6 @@
 shared_sources = files(
         'acl-util.c',
         'acpi-fpdt.c',
-        'apparmor-util.c',
         'ask-password-agent.c',
         'ask-password-api.c',
         'async.c',
@@ -279,6 +278,10 @@ if conf.get('HAVE_LIBIDN2') == 1
         shared_sources += files('idn-util.c')
 endif
 
+if conf.get('HAVE_APPARMOR') == 1
+        shared_sources += files('apparmor-util.c')
+endif
+
 generate_ip_protocol_list = files('generate-ip-protocol-list.sh')
 ip_protocol_list_txt = custom_target(
         input : [generate_ip_protocol_list, ipproto_sources],