aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/iowatch.cc1
-rw-r--r--lib/plpintl.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/iowatch.cc b/lib/iowatch.cc
index 7335d4a..5a975f7 100644
--- a/lib/iowatch.cc
+++ b/lib/iowatch.cc
@@ -33,6 +33,7 @@
IOWatch::IOWatch() {
num = 0;
io = new int [FD_SETSIZE];
+ memset(io, -1, FD_SETSIZE);
}
IOWatch::~IOWatch() {
diff --git a/lib/plpintl.h b/lib/plpintl.h
index e28fde0..7eb4da9 100644
--- a/lib/plpintl.h
+++ b/lib/plpintl.h
@@ -39,6 +39,11 @@ extern inline char * stpcpy(char *dest, const char *src) {
}
#endif
+/* libintl.h includes locale.h only if optimized.
+ * however, we need LC_ALL ...
+ */
+#include <locale.h>
+
#if defined(ENABLE_NLS) && defined(HAVE_GETTEXT)
# include <libintl.h>
static inline const char *X_(const char *t) { return gettext(t); }