This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=c3afad847701370dd45ec58414580115c8ea1d2c commit c3afad847701370dd45ec58414580115c8ea1d2c Author: Guillem Jover <[email protected]> AuthorDate: Fri Feb 7 12:30:52 2020 +0100 libcompat: Disarm libselinux setexecfilecon() declaration for libcompat-test When building the selinux module as part of the libcompat-test library, that takes care of making sure the libcompat code can compile all the time, we are redeclaring the symbol which causes a compiler warning. Remap the symbol while we include the libselinux headers and then remove the remapping so that ours is used. Warned-by: gcc -Wredundant-decls --- debian/changelog | 2 ++ lib/compat/selinux.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index ccbb41a42..3c953d170 100644 --- a/debian/changelog +++ b/debian/changelog @@ -192,6 +192,8 @@ dpkg (1.20.0) UNRELEASED; urgency=medium - dselect: Use static_cast<> instead of old-style type qualifier cast. - dselect: Do not use unnecessary old-style casts. - dselect: Fix variable types to avoid needing old-style casts. + - libcompat: Disarm libselinux setexecfilecon() declaration for + libcompat-test. * Build system: - Bump minimal Perl version to 5.24.1. - Add a serial versioning to the m4 files. diff --git a/lib/compat/selinux.c b/lib/compat/selinux.c index 7d3b33a6b..9e50e03d8 100644 --- a/lib/compat/selinux.c +++ b/lib/compat/selinux.c @@ -23,8 +23,16 @@ #include <string.h> #include <stdlib.h> +/* We need to disarm the libselinux declaration to avoid a redundant + * declaration. */ +#if TEST_LIBCOMPAT +#define setexecfilecon setexecfilecon_libselinux +#endif #include <selinux/selinux.h> #include <selinux/context.h> +#if TEST_LIBCOMPAT +#undef setexecfilecon +#endif #include "compat.h" -- Dpkg.Org's dpkg

