about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2010-06-24T17·51+0000
committerPeter Simons <simons@cryp.to>2010-06-24T17·51+0000
commita17071fef15115dc0e7052ebe091ffe8457f77d0 (patch)
treeec310a7a2b6c97a3d7df56cdea90977b268ee1dc /src/libstore/build.cc
parent560ab22f7db8238672ed3117ef8bf0de8baf9155 (diff)
Include <cstring> to ensure that strcpy(), strlen(), and memset() are declared.
An "using namespace std" was added locally in those functions that refer to
names from <cstring>. That is not pretty, but it's a very portable solution,
because strcpy() and friends will be found in both the 'std' and in the global
namespace.
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index a53c23bf44..ef2f7adf31 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -25,6 +25,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <stdio.h>
+#include <cstring>
 
 #include <pwd.h>
 #include <grp.h>
@@ -2638,6 +2639,7 @@ void Worker::waitForInput()
         timeout.tv_sec = std::max((time_t) 0, lastWokenUp + wakeUpInterval - before);
     } else lastWokenUp = 0;
 
+    using namespace std;
     /* Use select() to wait for the input side of any logger pipe to
        become `available'.  Note that `available' (i.e., non-blocking)
        includes EOF. */