From: Zbigniew Jędrzejewski-Szmek Date: Thu, 6 Feb 2020 20:37:49 +0000 (+0100) Subject: basic/selinux-util: expose _cleanup_freecon_ X-Git-Tag: v245-rc2~78^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d7887449e7c972770b6dd896f7d8c09f0d26c88f;p=thirdparty%2Fsystemd.git basic/selinux-util: expose _cleanup_freecon_ --- diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c index 1d209d03d56..90bb93ed0b8 100644 --- a/src/basic/selinux-util.c +++ b/src/basic/selinux-util.c @@ -28,10 +28,7 @@ #include "time-util.h" #if HAVE_SELINUX -DEFINE_TRIVIAL_CLEANUP_FUNC(char*, freecon); DEFINE_TRIVIAL_CLEANUP_FUNC(context_t, context_free); - -#define _cleanup_freecon_ _cleanup_(freeconp) #define _cleanup_context_free_ _cleanup_(context_freep) static int cached_use = -1; diff --git a/src/basic/selinux-util.h b/src/basic/selinux-util.h index 639c35b687b..b73b7c50e07 100644 --- a/src/basic/selinux-util.h +++ b/src/basic/selinux-util.h @@ -8,6 +8,13 @@ #include "macro.h" #include "label.h" +#if HAVE_SELINUX +#include + +DEFINE_TRIVIAL_CLEANUP_FUNC(char*, freecon); +#define _cleanup_freecon_ _cleanup_(freeconp) +#endif + bool mac_selinux_use(void); void mac_selinux_retest(void);