Fix compiling with -O0 (see <https://bugs.gentoo.org/show_bug.cgi?id=319559>)


--- a/wrestool/main.c
+++ b/wrestool/main.c
@@ -32,6 +32,10 @@
 #include "common/string-utils.h"
 #include "wrestool.h"
 
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
 #define PROGRAM "wrestool"
 
 
--- a/icotool/main.c
+++ b/icotool/main.c
@@ -37,6 +37,10 @@
 #include "common/io-utils.h"
 #include "icotool.h"
 
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
 #define PROGRAM "icotool"
 
 static int32_t image_index = -1;
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,7 @@
 AC_HEADER_SYS_WAIT
 AC_HEADER_TIME
 #AC_CHECK_HEADERS([byteswap.h errno.h fcntl.h getopt.h limits.h sys/stat.h sys/time.h sys/types.h unistd.h])
+AC_CHECK_HEADERS([locale.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_INLINE
