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=2261027d7fe5349931683fe0dbf17c11c2e4e454 commit 2261027d7fe5349931683fe0dbf17c11c2e4e454 Author: Guillem Jover <[email protected]> AuthorDate: Sat May 16 17:33:12 2020 +0200 libdpkg: When using uselocale(), include <xlocale.h> if available Some systems do not have the locale_t and extended locale support definitions in <locale.h> but instead in <xlocale.h>, such as some BSDs. This got later standardized in POSIX.1-2008 in <locale.h>. Reported-by: Sirio Balmelli <[email protected]> --- configure.ac | 1 + debian/changelog | 4 ++++ lib/dpkg/i18n.c | 3 +++ 3 files changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index a0bc4cf0a..16800e8e8 100644 --- a/configure.ac +++ b/configure.ac @@ -106,6 +106,7 @@ AC_CHECK_HEADERS([\ error.h \ err.h \ locale.h \ + xlocale.h \ libintl.h \ kvm.h \ sys/sysmacros.h \ diff --git a/debian/changelog b/debian/changelog index 61d28373a..0b70045b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,10 @@ dpkg (1.20.1) UNRELEASED; urgency=medium Prompted by Felix Lechner <[email protected]>. * dpkg-deb, dpkg: Do not accept relative pathnames in DEBIAN/conffiles. Reported by Niels Thykier <[email protected]>. + * Portability: + - libdpkg: When using uselocale(), include <xlocale.h> for locale_t if + the header is available. Needed on BSDs. + Reported by Sirio Balmelli <[email protected]>. * Perl modules: - Dpkg: Add a LICENSE section to the POD. - Dpkg::Source::Package: Add new get_upstream_signing_key() method. diff --git a/lib/dpkg/i18n.c b/lib/dpkg/i18n.c index 495270003..cec00eea9 100644 --- a/lib/dpkg/i18n.c +++ b/lib/dpkg/i18n.c @@ -24,6 +24,9 @@ #include <dpkg/i18n.h> #ifdef HAVE_USELOCALE +#ifdef HAVE_XLOCALE_H +#include <xlocale.h> +#endif static locale_t dpkg_C_locale; #endif -- Dpkg.Org's dpkg

