[PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD

Sirio Balmelli
>From afca7b4ae1db7926698f7a5ff47ce0f03f42c663 Mon Sep 17 00:00:00 2001
From: Sirio Balmelli <[hidden email]>
Date: Wed, 13 May 2020 20:02:48 +0200
Subject: [PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD
To: [hidden email]

Fixes build failures starting with:

    i18n.c:27:8: error: unknown type name 'locale_t'

Signed-off-by: Sirio Balmelli <[hidden email]>
---
 lib/dpkg/i18n.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/dpkg/i18n.c b/lib/dpkg/i18n.c
index 495270003..d98392783 100644
--- a/lib/dpkg/i18n.c
+++ b/lib/dpkg/i18n.c
@@ -24,6 +24,9 @@
 #include <dpkg/i18n.h>

 #ifdef HAVE_USELOCALE
+#if __APPLE__
+#include <xlocale.h>
+#endif
 static locale_t dpkg_C_locale;
 #endif

--
2.26.2





Reply | Threaded
Open this post in threaded view
|

RE: [PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD

Don Gould
Why does my temp gauge have this language message in it?  ;)

Thanks for the help guys.

D



-- 
Don Gould
5 Cargill Place
Richmond
Christchurch, New Zealand
Mobile/Telegram: + 64 21 114 0699
www.bowenvale.co.nz



-------- Original message --------
From: Sirio Balmelli <[hidden email]>
Date: 16/05/20 4:13 am (GMT+12:00)
Subject: [PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD

>From afca7b4ae1db7926698f7a5ff47ce0f03f42c663 Mon Sep 17 00:00:00 2001
From: Sirio Balmelli <[hidden email]>
Date: Wed, 13 May 2020 20:02:48 +0200
Subject: [PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD
To: [hidden email]

Fixes build failures starting with:

    i18n.c:27:8: error: unknown type name 'locale_t'

Signed-off-by: Sirio Balmelli <[hidden email]>
---
lib/dpkg/i18n.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/lib/dpkg/i18n.c b/lib/dpkg/i18n.c
index 495270003..d98392783 100644
--- a/lib/dpkg/i18n.c
+++ b/lib/dpkg/i18n.c
@@ -24,6 +24,9 @@
#include <dpkg/i18n.h>

#ifdef HAVE_USELOCALE
+#if __APPLE__
+#include <xlocale.h>
+#endif
static locale_t dpkg_C_locale;
#endif

--
2.26.2





Reply | Threaded
Open this post in threaded view
|

RE: [PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD

Sirio Balmelli
Hello :)

I am the author of this patch; submitted it to the mailing list kernel-style to see what would happen.

In my workflow I use dpkg on Darwin (macOS), through the Nix package manager.

Building dpkg 1.20 borked with this message about internationalization, so I submitted this patch which fixes the issue on Darwin.

The corresponding git commit for this patch is here: https://github.com/siriobalmelli-foss/dpkg/commit/afca7b4ae1db7926698f7a5ff47ce0f03f42c663

FYI the patch has also been submitted for inclusion into nixpkgs so that downstream is ok while I work to get this fixed upstream: https://github.com/NixOS/nixpkgs/pull/87755


So ... am I presenting this right for inclusion into dpkg upstream?

Thank you, and any feedback is welcome :)

best,

Sirio

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday, May 16, 2020 2:47 AM, Don Gould <[hidden email]> wrote:

> Why does my temp gauge have this language message in it?  ;)
>
> Thanks for the help guys.
>
> D
>
> --
> Don Gould
> 5 Cargill Place
> Richmond
> Christchurch, New Zealand
> Mobile/Telegram: + 64 21 114 0699
> www.bowenvale.co.nz
>
> -------- Original message --------
> From: Sirio Balmelli <[hidden email]>
> Date: 16/05/20 4:13 am (GMT+12:00)
> To: [hidden email]
> Subject: [PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD
>
> >From afca7b4ae1db7926698f7a5ff47ce0f03f42c663 Mon Sep 17 00:00:00 2001
> From: Sirio Balmelli <[hidden email]>
> Date: Wed, 13 May 2020 20:02:48 +0200
> Subject: [PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD
> To: [hidden email]
>
> Fixes build failures starting with:
>
>     i18n.c:27:8: error: unknown type name 'locale_t'
>
> Signed-off-by: Sirio Balmelli <[hidden email]>
> ---
> lib/dpkg/i18n.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/lib/dpkg/i18n.c b/lib/dpkg/i18n.c
> index 495270003..d98392783 100644
> --- a/lib/dpkg/i18n.c
> +++ b/lib/dpkg/i18n.c
> @@ -24,6 +24,9 @@
> #include <dpkg/i18n.h>
>
> #ifdef HAVE_USELOCALE
> +#if __APPLE__
> +#include <xlocale.h>
> +#endif
> static locale_t dpkg_C_locale;
> #endif
>
> --
> 2.26.2