python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / ushare / 0003-ushare-c-include-config-h-before-checking-for-CONFIG-NLS.patch
blobe97c3deabcdee21e801abb158fea9d7905b4ccd0
1 ushare.c: include config.h before checking for CONFIG_NLS
3 When NLS support is enabled, we get following build errors:
5 ushare.c: In function 'setup_i18n':
6 ushare.c:745:3: warning: implicit declaration of function 'setlocale' [-Wimplicit-function-declaration]
7 setlocale (LC_ALL, "");
9 ushare.c:745:14: error: 'LC_ALL' undeclared (first use in this function)
10 setlocale (LC_ALL, "");
12 ushare.c:745:14: note: each undeclared identifier is reported only once for each function it appears in
13 make[2]: *** [ushare.o] Error 1
15 When NLS support is enabled, configure script creates macro in config.h.
16 We check for CONFIG_NLS before including config.h which results in above
17 build errors as locale.h doesn't get included.
19 This patch fixes above build error by including config.h before we check for
20 CONFIG_NLS.
22 This build error is detected by Buildroot autobuilder
23 http://autobuild.buildroot.net/results/19d/19d67dd43e5a313c77e4be97ecb9811ffa52f797/
25 Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
27 --- ushare-1.1a/src/ushare.c.old 2016-09-20 19:04:00.915239326 +0530
28 +++ ushare-1.1a/src/ushare.c 2016-09-20 19:04:24.707239276 +0530
29 @@ -56,11 +56,12 @@
30 #include <upnp/upnp.h>
31 #include <upnp/upnptools.h>
33 +#include "config.h"
35 #if (defined(HAVE_SETLOCALE) && defined(CONFIG_NLS))
36 # include <locale.h>
37 #endif
39 -#include "config.h"
40 #include "ushare.h"
41 #include "services.h"
42 #include "http.h"