libselinux: avoid unused function

Define selabel_subs_init() only if its call-sites are enabled.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
Christian Göttsche 2023-08-09 19:57:04 +02:00 committed by James Carter
parent 25a1811087
commit 275daa4e0b

View File

@ -674,6 +674,7 @@ static char *selabel_sub(struct selabel_sub *ptr, const char *src)
return NULL;
}
#if !defined(BUILD_HOST) && !defined(ANDROID)
static int selabel_subs_init(const char *path, struct selabel_digest *digest,
struct selabel_sub **out_subs)
{
@ -756,6 +757,7 @@ err:
}
goto out;
}
#endif
static char *selabel_sub_key(struct saved_data *data, const char *key)
{