From: Karel Zak Date: Thu, 19 Mar 2026 12:39:52 +0000 (+0100) Subject: meson: add check for security_get_initial_context() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fadcbe54ba67ffe3530aa27f476578d6e9212894;p=thirdparty%2Futil-linux.git meson: add check for security_get_initial_context() The mount command uses HAVE_SECURITY_GET_INITIAL_CONTEXT to enable SELinux context warnings. This check was missing in meson, leaving that code path dead in meson builds. Autotools checks for this function in configure.ac since it may be missing in old libselinux 1.xx versions. Signed-off-by: Karel Zak --- diff --git a/meson.build b/meson.build index ec7b8d9c6..6bb4d1d92 100644 --- a/meson.build +++ b/meson.build @@ -473,6 +473,11 @@ lib_selinux = dependency( version : '>= 2.5', required : get_option('selinux')) conf.set('HAVE_LIBSELINUX', lib_selinux.found() ? 1 : false) +if lib_selinux.found() + have = cc.has_function('security_get_initial_context', + dependencies : lib_selinux) + conf.set('HAVE_SECURITY_GET_INITIAL_CONTEXT', have ? 1 : false) +endif lib_magic = dependency( 'libmagic',