From: William Roberts <william.c.roberts@xxxxxxxxx> avc_init is deprecated, however avc_open internally uses it. Mark this deprecated use as OK. Another approach could be to define an avc_init2 as a hidden, internal symbol and call that, but this was seemed simpler and clear. Signed-off-by: William Roberts <william.c.roberts@xxxxxxxxx> --- libselinux/src/avc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libselinux/src/avc.c b/libselinux/src/avc.c index 5230efd2323a..7d30f0052f7c 100644 --- a/libselinux/src/avc.c +++ b/libselinux/src/avc.c @@ -156,8 +156,10 @@ int avc_open(struct selinux_opt *opts, unsigned nopts) avc_enforcing = !!opts[nopts].value; break; } - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" return avc_init("avc", NULL, NULL, NULL, NULL); +#pragma GCC diagnostic pop } int avc_init(const char *prefix, -- 2.17.1