Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From 4b84f243a70a8c07f6a38dad3c9411fa707f25c9 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sun, 4 Mar 2018 17:08:43 -0800 |
| 4 | Subject: [PATCH] use _nl_msg_cat_cntr only with glibc |
| 5 | |
| 6 | The musl libc provides libintl (similar to glibc) |
| 7 | but does not use the same internals, |
| 8 | so even though we are using the GNU gettext |
| 9 | the libintl included with the libc does not define |
| 10 | _nl_msg_cat_cntr and it does not need to. |
| 11 | |
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 13 | --- |
| 14 | Upstream-Status: Pending |
| 15 | |
| 16 | src/NCi18n.h | 3 ++- |
| 17 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 18 | |
| 19 | diff --git a/src/NCi18n.h b/src/NCi18n.h |
| 20 | index 165b0e7..bfc4ed7 100644 |
| 21 | --- a/src/NCi18n.h |
| 22 | +++ b/src/NCi18n.h |
| 23 | @@ -59,12 +59,13 @@ inline void setTextdomain( const char * domain ) |
| 24 | bindtextdomain( domain, YSettings::localeDir().c_str() ); |
| 25 | bind_textdomain_codeset( domain, "UTF-8" ); |
| 26 | textdomain( domain ); |
| 27 | - |
| 28 | +#if defined(__GLIBC__) |
| 29 | // Make change known |
| 30 | { |
| 31 | extern int _nl_msg_cat_cntr; |
| 32 | ++_nl_msg_cat_cntr; |
| 33 | } |
| 34 | +#endif |
| 35 | } |
| 36 | |
| 37 | |
| 38 | -- |
| 39 | 2.16.2 |
| 40 | |