diff mbox series

[16/17] src/matchpathcon: allow use of deprecated funcs

Message ID 20200225200219.6163-17-william.c.roberts@intel.com (mailing list archive)
State Changes Requested
Headers show
Series [01/17] security_load_booleans: update return comment | expand

Commit Message

William Roberts Feb. 25, 2020, 8:02 p.m. UTC
From: William Roberts <william.c.roberts@intel.com>

Internally users of deprecated functions are ok so allow it.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
---
 libselinux/src/matchpathcon.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c
index 05a5cfa4cfd5..2e5aa347b52b 100644
--- a/libselinux/src/matchpathcon.c
+++ b/libselinux/src/matchpathcon.c
@@ -317,7 +317,10 @@  void matchpathcon_filespec_destroy(void)
 
 static void matchpathcon_thread_destructor(void __attribute__((unused)) *ptr)
 {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 	matchpathcon_fini();
+#pragma GCC diagnostic pop
 }
 
 void __attribute__((destructor)) matchpathcon_lib_destructor(void);
@@ -451,8 +454,10 @@  int matchpathcon(const char *path, mode_t mode, char ** con)
 
 int matchpathcon_index(const char *name, mode_t mode, char ** con)
 {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 	int i = matchpathcon(name, mode, con);
-
+#pragma GCC diagnostic pop
 	if (i < 0)
 		return -1;