aboutsummaryrefslogtreecommitdiff
path: root/src/nix-worker/nix-worker.cc
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2010-06-24 17:51:04 +0000
committerPeter Simons <simons@cryp.to>2010-06-24 17:51:04 +0000
commita17071fef15115dc0e7052ebe091ffe8457f77d0 (patch)
treeec310a7a2b6c97a3d7df56cdea90977b268ee1dc /src/nix-worker/nix-worker.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/nix-worker/nix-worker.cc')
-rw-r--r--src/nix-worker/nix-worker.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index bd2209c6d..0052fbb7d 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -7,6 +7,7 @@
#include "globals.hh"
#include <iostream>
+#include <cstring>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
@@ -111,6 +112,7 @@ static bool isFarSideClosed(int socket)
time and wouldn't have to worry about races. */
static void sigPollHandler(int sigNo)
{
+ using namespace std;
try {
/* Check that the far side actually closed. We're still
getting spurious signals every once in a while. I.e.,