summaryrefslogtreecommitdiff
blob: bf96e69f924caa5db43b8bd49f55bb462b77bd64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
this has been sent upstream

From eac944b0757963ac1ba035ea72617734510ede22 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@chromium.org>
Date: Mon, 12 Oct 2015 17:58:51 -0400
Subject: [PATCH] intl/localename: control langinfo.h inclusion

This header is only used to work around buggy behavior in old versions
of glibc, so do not include it all the time.  Otherwise we get build
failures on systems that do not provide langinfo.h.

* gettext-runtime/intl/localename.c: Wrap langinfo.h include with same
ifdefs used in the source later on.
---
 gettext-runtime/intl/localename.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gettext-runtime/intl/localename.c b/gettext-runtime/intl/localename.c
index f8cf3f2..c27be86 100644
--- a/gettext-runtime/intl/localename.c
+++ b/gettext-runtime/intl/localename.c
@@ -38,7 +38,9 @@
 # if defined __APPLE__ && defined __MACH__
 #  include <xlocale.h>
 # endif
-# include <langinfo.h>
+# if __GLIBC__ >= 2 && !defined __UCLIBC__
+#  include <langinfo.h>
+# endif
 # if !defined IN_LIBINTL
 #  include "glthread/lock.h"
 # endif
-- 
2.5.2