[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

Guillem Jover
Hi!

On Wed, 2020-05-13 at 18:11:00 +0000, Sirio Balmelli wrote:
> Subject: [PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD

> Fixes build failures starting with:
>
>     i18n.c:27:8: error: unknown type name 'locale_t'
>
> Signed-off-by: Sirio Balmelli <[hidden email]>

Thanks for the report and patch! I've fixed this instead by checking
for the availability of the header:

  <https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=2261027>

Regards,
Guillem

Reply | Threaded
Open this post in threaded view
|

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

Sirio Balmelli
That's brilliant, thank you :)

Makes sense to do it there rather than an #ifdef in the file.
I've updated the Nix derivation accordingly.

Fast response much appreciated,

Sirio

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, May 17, 2020 12:45 AM, Guillem Jover <[hidden email]> wrote:

> Hi!
>
> On Wed, 2020-05-13 at 18:11:00 +0000, Sirio Balmelli wrote:
>
> > Subject: [PATCH] i18n.c: add dependency on xlocale.h for DarwinBSD
>
> > Fixes build failures starting with:
> >
> >     i18n.c:27:8: error: unknown type name 'locale_t'
> >
> >
> > Signed-off-by: Sirio Balmelli [hidden email]
>
> Thanks for the report and patch! I've fixed this instead by checking
> for the availability of the header:
>
> https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=2261027
>
> Regards,
> Guillem