diff --git a/src/threadexecutor.cpp b/src/threadexecutor.cpp index efcd2b5b6..49fa51a31 100644 --- a/src/threadexecutor.cpp +++ b/src/threadexecutor.cpp @@ -24,6 +24,8 @@ #include #include #include +#include +#include #endif ThreadExecutor::ThreadExecutor(const std::vector &filenames, const Settings &settings, ErrorLogger &errorLogger) @@ -166,8 +168,8 @@ void ThreadExecutor::writeToPipe(char type, const std::string &data) unsigned int len = data.length() + 1; char *out = new char[ len + 1 + sizeof(len)]; out[0] = type; - memcpy(&(out[1]), &len, sizeof(len)); - memcpy(&(out[1+sizeof(len)]), data.c_str(), len); + std::memcpy(&(out[1]), &len, sizeof(len)); + std::memcpy(&(out[1+sizeof(len)]), data.c_str(), len); write(_pipe[1], out, len + 1 + sizeof(len)); }