[oe-commits] [meta-openembedded] 25/33: libyui-ncurses: Fix build with musl _nl_msg_cat_cntr in not available

git at git.openembedded.org git at git.openembedded.org
Thu Mar 22 02:08:33 UTC 2018


This is an automated email from the git hooks/post-receive script.

armin_kuster pushed a commit to branch master-next
in repository meta-openembedded.

commit 59a018c92b0f8390083262a6a4799e529e83cf37
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sun Mar 4 19:01:15 2018 -0800

    libyui-ncurses: Fix build with musl _nl_msg_cat_cntr in not available
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 ...0001-use-_nl_msg_cat_cntr-only-with-glibc.patch | 40 ++++++++++++++++++++++
 .../recipes-graphics/libyui/libyui-ncurses_git.bb  |  1 +
 2 files changed, 41 insertions(+)

diff --git a/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-use-_nl_msg_cat_cntr-only-with-glibc.patch b/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-use-_nl_msg_cat_cntr-only-with-glibc.patch
new file mode 100644
index 0000000..8e3774c
--- /dev/null
+++ b/meta-oe/recipes-graphics/libyui/libyui-ncurses/0001-use-_nl_msg_cat_cntr-only-with-glibc.patch
@@ -0,0 +1,40 @@
+From 4b84f243a70a8c07f6a38dad3c9411fa707f25c9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sun, 4 Mar 2018 17:08:43 -0800
+Subject: [PATCH] use _nl_msg_cat_cntr only with glibc
+
+The musl libc provides libintl (similar to glibc)
+but does not use the same internals,
+so even though we are using the GNU gettext
+the libintl included with the libc does not define
+_nl_msg_cat_cntr and it does not need to.
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+Upstream-Status: Pending
+
+ src/NCi18n.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/NCi18n.h b/src/NCi18n.h
+index 165b0e7..bfc4ed7 100644
+--- a/src/NCi18n.h
++++ b/src/NCi18n.h
+@@ -59,12 +59,13 @@ inline void setTextdomain( const char * domain )
+     bindtextdomain( domain,  YSettings::localeDir().c_str() );
+     bind_textdomain_codeset( domain, "UTF-8" );
+     textdomain( domain );
+-
++#if defined(__GLIBC__)
+     // Make change known
+     {
+ 	extern int _nl_msg_cat_cntr;
+ 	++_nl_msg_cat_cntr;
+     }
++#endif
+ }
+ 
+ 
+-- 
+2.16.2
+
diff --git a/meta-oe/recipes-graphics/libyui/libyui-ncurses_git.bb b/meta-oe/recipes-graphics/libyui/libyui-ncurses_git.bb
index f60c856..578c713 100644
--- a/meta-oe/recipes-graphics/libyui/libyui-ncurses_git.bb
+++ b/meta-oe/recipes-graphics/libyui/libyui-ncurses_git.bb
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING.lgpl-3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
 "
 
 SRC_URI = "git://github.com/libyui/libyui-ncurses.git \
+           file://0001-use-_nl_msg_cat_cntr-only-with-glibc.patch \
           "
 
 SRC_URI_append_class-target = " file://0001-Fix-the-error-of-can-t-find-header-file.patch"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list