about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boost/format.hpp9
-rw-r--r--src/libmain/shared.cc3
-rw-r--r--src/libstore/exec.cc1
-rw-r--r--src/libstore/store.cc1
-rw-r--r--src/nix-env/main.cc2
5 files changed, 13 insertions, 3 deletions
diff --git a/src/boost/format.hpp b/src/boost/format.hpp
index a287048ed338..1476cb796d46 100644
--- a/src/boost/format.hpp
+++ b/src/boost/format.hpp
@@ -24,10 +24,13 @@
 #include <sstream>
 #include <cassert>
 
+#if HAVE_LOCALE
 #include <locale>
-//#define BOOST_NO_STD_LOCALE
-//#define BOOST_NO_LOCALE_ISIDIGIT
-//#include <cctype>
+#else
+#define BOOST_NO_STD_LOCALE
+#define BOOST_NO_LOCALE_ISIDIGIT
+#include <cctype>
+#endif
 
 #include <boost/format/macros_default.hpp>
 
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index b99a74bb4027..92349488e761 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -1,3 +1,4 @@
+
 #include <iostream>
 #include <cctype>
 
@@ -71,7 +72,9 @@ int main(int argc, char * * argv)
     ATinit(argc, argv, &bottomOfStack);
 
     /* Turn on buffering for cerr. */
+#if HAVE_PUBSETBUF
     cerr.rdbuf()->pubsetbuf(buf, sizeof(buf));
+#endif
 
     try {
         initAndRun(argc, argv);
diff --git a/src/libstore/exec.cc b/src/libstore/exec.cc
index 47a385f147d5..2adf03841c4f 100644
--- a/src/libstore/exec.cc
+++ b/src/libstore/exec.cc
@@ -1,4 +1,5 @@
 #include <iostream>
+#include <cstdio>
 
 #include <sys/types.h>
 #include <sys/stat.h>
diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index acdb4708e2d5..20625b9fe82c 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -1,4 +1,5 @@
 #include <iostream>
+#include <algorithm>
 
 #include <sys/wait.h>
 #include <unistd.h>
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index 06678fc518d7..6150b2fb6c00 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -1,3 +1,5 @@
+#include <cerrno>
+
 #include "globals.hh"
 #include "normalise.hh"
 #include "shared.hh"