summaryrefslogtreecommitdiff
blob: d73ae119ea5ebac920f8e8e5802f37f2c9452b83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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