---
configure.ac | 2 ++
src/cli/cli.c | 6 +++---
src/plugins/report.c | 3 +++
src/plugins/reporter-bugzilla.c | 4 +++-
src/plugins/reporter-kerneloops.c | 3 +++
src/plugins/reporter-mailx.c | 3 +++
src/plugins/reporter-print.c | 3 +++
src/plugins/reporter-rhtsupport.c | 3 +++
src/plugins/reporter-upload.c | 3 +++
9 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 851cc89..e16b58d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,8 @@ PKG_PROG_PKG_CONFIG
AC_CHECK_HEADER([libtar.h], [],
[AC_MSG_ERROR([libtar.h is needed to build libreport])])
+AC_CHECK_HEADERS([locale.h])
+
CONF_DIR='${sysconfdir}/${PACKAGE_NAME}'
VAR_RUN='${localstatedir}/run'
PLUGINS_CONF_DIR='${sysconfdir}/${PACKAGE_NAME}/plugins'
diff --git a/src/cli/cli.c b/src/cli/cli.c
index 0072c10..db603b6 100644
--- a/src/cli/cli.c
+++ b/src/cli/cli.c
@@ -15,12 +15,12 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#if HAVE_LOCALE_H
-# include <locale.h>
-#endif
#include <getopt.h>
#include <syslog.h>
#include "internal_libreport.h"
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif
#include "cli-report.h"
static char *do_log(char *log_line, void *param)
diff --git a/src/plugins/report.c b/src/plugins/report.c
index e6e976b..3ccd541 100644
--- a/src/plugins/report.c
+++ b/src/plugins/report.c
@@ -17,6 +17,9 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "internal_libreport.h"
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif /* HAVE_LOCALE_H */
int main(int argc, char **argv)
{
diff --git a/src/plugins/reporter-bugzilla.c b/src/plugins/reporter-bugzilla.c
index 39f356a..3165f5d 100644
--- a/src/plugins/reporter-bugzilla.c
+++ b/src/plugins/reporter-bugzilla.c
@@ -16,8 +16,10 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <locale.h>
#include "internal_libreport.h"
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif /* HAVE_LOCALE_H */
#include "client.h"
#include "abrt_xmlrpc.h"
#include "rhbz.h"
diff --git a/src/plugins/reporter-kerneloops.c b/src/plugins/reporter-kerneloops.c
index 81ab93e..ef8288e 100644
--- a/src/plugins/reporter-kerneloops.c
+++ b/src/plugins/reporter-kerneloops.c
@@ -18,6 +18,9 @@
*/
#include "abrt_curl.h"
#include "internal_libreport.h"
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif /* HAVE_LOCALE_H */
/* helpers */
static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
diff --git a/src/plugins/reporter-mailx.c b/src/plugins/reporter-mailx.c
index 83d12e8..38a7886 100644
--- a/src/plugins/reporter-mailx.c
+++ b/src/plugins/reporter-mailx.c
@@ -17,6 +17,9 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "internal_libreport.h"
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif /* HAVE_LOCALE_H */
static void exec_and_feed_input(const char* text, char **args)
{
diff --git a/src/plugins/reporter-print.c b/src/plugins/reporter-print.c
index e7f6c3d..7efa285 100644
--- a/src/plugins/reporter-print.c
+++ b/src/plugins/reporter-print.c
@@ -19,6 +19,9 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "internal_libreport.h"
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif /* HAVE_LOCALE_H */
#include "client.h"
static const char *dump_dir_name = ".";
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
index d90d744..4244a67 100644
--- a/src/plugins/reporter-rhtsupport.c
+++ b/src/plugins/reporter-rhtsupport.c
@@ -18,6 +18,9 @@
*/
#include <libtar.h>
#include "internal_libreport.h"
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif /* HAVE_LOCALE_H */
#include "client.h"
#include "abrt_curl.h"
#include "abrt_xmlrpc.h"
diff --git a/src/plugins/reporter-upload.c b/src/plugins/reporter-upload.c
index 16b588d..f43dfe7 100644
--- a/src/plugins/reporter-upload.c
+++ b/src/plugins/reporter-upload.c
@@ -19,6 +19,9 @@
#include <libtar.h>
#include "abrt_curl.h"
#include "internal_libreport.h"
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif /* HAVE_LOCALE_H */
//TODO: use this for better logging
#if 0
--
1.7.7.6