Fixed for freebsd

This commit is contained in:
BenDroid 2018-01-12 23:12:39 +01:00
parent e7bf633010
commit e8d8d4e866

View file

@ -31,7 +31,10 @@
#include <signal.h> #include <signal.h>
#include <chrono> #include <chrono>
#include <thread> #include <thread>
#else
#include <sys/wait.h>
#endif #endif
int main(int argc, char **argv) { int main(int argc, char **argv) {
std::string ownPath(argv[0]); std::string ownPath(argv[0]);
@ -46,7 +49,7 @@ int main(int argc, char **argv) {
std::string xmrigMinerPath = ownPath.substr(0, pos+1) + xmrigMiner; std::string xmrigMinerPath = ownPath.substr(0, pos+1) + xmrigMiner;
#ifdef WIN32 #if defined(_WIN32) || defined(WIN32)
xmrigMinerPath = "\"" + xmrigMinerPath + "\""; xmrigMinerPath = "\"" + xmrigMinerPath + "\"";
#endif #endif
@ -61,7 +64,7 @@ int main(int argc, char **argv) {
do { do {
status = system(xmrigMinerPath.c_str()); status = system(xmrigMinerPath.c_str());
#ifdef WIN32 #if defined(_WIN32) || defined(WIN32)
} while (status == EINTR); } while (status == EINTR);
if (status == EINVAL) { if (status == EINVAL) {