Work around libselinux API deprecations

Due to -Werror, they resulted in build failures.
This commit is contained in:
Florian Weimer 2020-07-21 14:41:25 +02:00
parent b633c425b5
commit 1554837500
3 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,20 @@
This is necessary to get things building again after libselinux changes.
A proper fix is under discussion upstream:
<https://sourceware.org/pipermail/libc-alpha/2020-July/116504.html>
diff --git a/nss/makedb.c b/nss/makedb.c
index 8e389a1683747cf1..9d81aed57d384a22 100644
--- a/nss/makedb.c
+++ b/nss/makedb.c
@@ -17,6 +17,10 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+/* This file uses deprecated declarations from libselinux. */
+#include <libc-diag.h>
+DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
+
#include <argp.h>
#include <assert.h>
#include <ctype.h>

View File

@ -0,0 +1,17 @@
This patch works around deprecated libselinux features used by nscd.
diff --git a/nscd/selinux.c b/nscd/selinux.c
index a4ea8008e201b939..0acca4639202a75a 100644
--- a/nscd/selinux.c
+++ b/nscd/selinux.c
@@ -17,6 +17,10 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+/* This file uses deprecated declarations from libselinux. */
+#include <libc-diag.h>
+DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations");
+
#include "config.h"
#include <error.h>
#include <errno.h>

View File

@ -168,6 +168,8 @@ Patch18: glibc-c-utf8-locale.patch
Patch23: glibc-python3.patch Patch23: glibc-python3.patch
Patch29: glibc-fedora-nsswitch.patch Patch29: glibc-fedora-nsswitch.patch
Patch30: glibc-rseq-disable.patch Patch30: glibc-rseq-disable.patch
Patch31: glibc-deprecated-selinux-makedb.patch
Patch32: glibc-deprecated-selinux-nscd.patch
############################################################################## ##############################################################################
# Continued list of core "glibc" package information: # Continued list of core "glibc" package information: