All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/zbar: fix NLS build with musl
@ 2020-08-29 13:03 Fabrice Fontaine
  2020-08-29 16:37 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2020-08-29 13:03 UTC (permalink / raw)
  To: buildroot

Fixes:
 - http://autobuild.buildroot.org/results/b93ce5430bf22ddda94ee30882a883348617f5b1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-zbar-cam-img-.c-fix-build-with-musl.patch | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 package/zbar/0002-zbarcam-zbar-cam-img-.c-fix-build-with-musl.patch

diff --git a/package/zbar/0002-zbarcam-zbar-cam-img-.c-fix-build-with-musl.patch b/package/zbar/0002-zbarcam-zbar-cam-img-.c-fix-build-with-musl.patch
new file mode 100644
index 0000000000..fe62c1649c
--- /dev/null
+++ b/package/zbar/0002-zbarcam-zbar-cam-img-.c-fix-build-with-musl.patch
@@ -0,0 +1,55 @@
+From ecf90fcff066c06eda1fb931d08fadf5989ecb36 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 29 Aug 2020 14:23:04 +0200
+Subject: [PATCH] zbarcam/zbar{cam,img}.c: fix build with musl
+
+setlocale is used since version 0.23.1 and
+https://git.linuxtv.org/zbar.git/commit/id=d05911f8d5fb8c1e064bd93ed9ec9f038c5da096
+
+Include locale.h to avoid the following build failure on musl:
+
+zbarcam/zbarcam.c:168:5: warning: implicit declaration of function 'setlocale'; did you mean 'setstate'? [-Wimplicit-function-declaration]
+     setlocale (LC_ALL, "");
+     ^~~~~~~~~
+     setstate
+zbarcam/zbarcam.c:168:16: error: 'LC_ALL' undeclared (first use in this function)
+     setlocale (LC_ALL, "");
+                ^~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/b93ce5430bf22ddda94ee30882a883348617f5b1
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/mchehab/zbar/pull/115]
+---
+ zbarcam/zbarcam.c | 1 +
+ zbarimg/zbarimg.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/zbarcam/zbarcam.c b/zbarcam/zbarcam.c
+index 6e13c8c..b8bc732 100644
+--- a/zbarcam/zbarcam.c
++++ b/zbarcam/zbarcam.c
+@@ -36,6 +36,7 @@
+ 
+ #ifdef ENABLE_NLS
+ # include <libintl.h>
++# include <locale.h>
+ # define _(string) gettext(string)
+ #else
+ # define _(string) string
+diff --git a/zbarimg/zbarimg.c b/zbarimg/zbarimg.c
+index d05d832..52502b2 100644
+--- a/zbarimg/zbarimg.c
++++ b/zbarimg/zbarimg.c
+@@ -41,6 +41,7 @@
+ 
+ #ifdef ENABLE_NLS
+ # include <libintl.h>
++# include <locale.h>
+ # define _(string) gettext(string)
+ #else
+ # define _(string) string
+-- 
+2.28.0
+
-- 
2.28.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH 1/1] package/zbar: fix NLS build with musl
  2020-08-29 13:03 [Buildroot] [PATCH 1/1] package/zbar: fix NLS build with musl Fabrice Fontaine
@ 2020-08-29 16:37 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2020-08-29 16:37 UTC (permalink / raw)
  To: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fixes:
 >  - http://autobuild.buildroot.org/results/b93ce5430bf22ddda94ee30882a883348617f5b1

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-29 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-29 13:03 [Buildroot] [PATCH 1/1] package/zbar: fix NLS build with musl Fabrice Fontaine
2020-08-29 16:37 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.