summaryrefslogtreecommitdiffstats
path: root/package/ushare
diff options
context:
space:
mode:
authorRahul Bedarkar <rahul.bedarkar@imgtec.com>2016-09-20 19:30:14 +0530
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-09-20 20:07:49 +0200
commit32ff9de23e9c6deabee572eee845642671e53a65 (patch)
treef02c8dfd04782a10771082a479a9564dd93a6c11 /package/ushare
parent42cdaaf945df203364cbb5be5f856636f9764260 (diff)
downloadbuildroot-32ff9de23e9c6deabee572eee845642671e53a65.tar.gz
buildroot-32ff9de23e9c6deabee572eee845642671e53a65.zip
ushare: fix build with NLS support
Add patch to fix build errors when NLS support is enabled. Fixes: http://autobuild.buildroot.net/results/19d/19d67dd43e5a313c77e4be97ecb9811ffa52f797/ Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/ushare')
-rw-r--r--package/ushare/0003-ushare-c-include-config-h-before-checking-for-CONFIG-NLS.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/package/ushare/0003-ushare-c-include-config-h-before-checking-for-CONFIG-NLS.patch b/package/ushare/0003-ushare-c-include-config-h-before-checking-for-CONFIG-NLS.patch
new file mode 100644
index 0000000000..e97c3deabc
--- /dev/null
+++ b/package/ushare/0003-ushare-c-include-config-h-before-checking-for-CONFIG-NLS.patch
@@ -0,0 +1,42 @@
+ushare.c: include config.h before checking for CONFIG_NLS
+
+When NLS support is enabled, we get following build errors:
+
+ ushare.c: In function 'setup_i18n':
+ ushare.c:745:3: warning: implicit declaration of function 'setlocale' [-Wimplicit-function-declaration]
+ setlocale (LC_ALL, "");
+ ^
+ ushare.c:745:14: error: 'LC_ALL' undeclared (first use in this function)
+ setlocale (LC_ALL, "");
+ ^
+ ushare.c:745:14: note: each undeclared identifier is reported only once for each function it appears in
+ make[2]: *** [ushare.o] Error 1
+
+When NLS support is enabled, configure script creates macro in config.h.
+We check for CONFIG_NLS before including config.h which results in above
+build errors as locale.h doesn't get included.
+
+This patch fixes above build error by including config.h before we check for
+CONFIG_NLS.
+
+This build error is detected by Buildroot autobuilder
+http://autobuild.buildroot.net/results/19d/19d67dd43e5a313c77e4be97ecb9811ffa52f797/
+
+Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
+
+--- ushare-1.1a/src/ushare.c.old 2016-09-20 19:04:00.915239326 +0530
++++ ushare-1.1a/src/ushare.c 2016-09-20 19:04:24.707239276 +0530
+@@ -56,11 +56,12 @@
+ #include <upnp/upnp.h>
+ #include <upnp/upnptools.h>
+
++#include "config.h"
++
+ #if (defined(HAVE_SETLOCALE) && defined(CONFIG_NLS))
+ # include <locale.h>
+ #endif
+
+-#include "config.h"
+ #include "ushare.h"
+ #include "services.h"
+ #include "http.h"
OpenPOWER on IntegriCloud