aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2020-08-29 14:23:04 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-10-08 09:20:27 +0200
commit1870dbea58c1d86a64bc1931b3b41f0e4cf0b060 (patch)
treef1371f061194637cef0e2dd7a423ba1079e43c1d
parentcfee96d2ce40e998c5662ee22b0b37fa7ebf6d24 (diff)
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>
-rw-r--r--zbarcam/zbarcam.c1
-rw-r--r--zbarimg/zbarimg.c1
2 files changed, 2 insertions, 0 deletions
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

Privacy Policy