From 970337c91c02afa9b8d33ab5596270594ffe58e6 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Mon, 10 Oct 2011 21:26:52 +0000 Subject: Some work in compiler happiness department. Signed-off-by: Michael Krelin --- diff --git a/src/dudki.cc b/src/dudki.cc index 91a3342..1f95be4 100644 --- a/src/dudki.cc +++ b/src/dudki.cc @@ -5,6 +5,8 @@ #include #include #include +#include +#include using namespace std; #include "configuration.h" #include "util.h" diff --git a/src/process.cc b/src/process.cc index 4807b98..3e9cc2b 100644 --- a/src/process.cc +++ b/src/process.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -112,7 +113,7 @@ void process::launch(const string& id,configuration& config) { if((getuid()!=uid) && setuid(uid)) throw runtime_error(string(__PRETTY_FUNCTION__)+": failed to setuid()"); } - char *argv[] = { "/bin/sh", "-c", (char*)restart_cmd.c_str(), NULL }; + char *argv[] = { const_cast("/bin/sh"), const_cast("-c"), (char*)restart_cmd.c_str(), NULL }; close(0); close(1); close(2); execv("/bin/sh",argv); }catch(exception& e) { -- cgit v0.9.0.2