--- MEGAsync-4.9.5.0_Linux/src/MEGASync/main.cpp.orig +++ MEGAsync-4.9.5.0_Linux/src/MEGASync/main.cpp @@ -10,7 +10,7 @@ #include #include -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS) #include #include #endif @@ -25,7 +25,7 @@ #include #endif -#if defined(WIN32) || defined(Q_OS_LINUX) +#if defined(WIN32) || defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS) #include #endif @@ -66,7 +66,7 @@ } } -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS) MegaApplication *theapp = NULL; bool waitForRestartSignal = false; std::mutex mtxcondvar; @@ -260,7 +260,7 @@ return 0; } -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS) // Ensure interesting signals are unblocked. sigset_t signalstounblock; @@ -348,7 +348,7 @@ #endif -#if defined(Q_OS_LINUX) +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS) if (!(getenv("DO_NOT_SET_QT_PLUGIN_PATH"))) { if (QDir(QString::fromUtf8("/opt/mega/plugins")).exists()) @@ -358,7 +358,7 @@ } #endif -#if defined(Q_OS_LINUX) && QT_VERSION >= 0x050C00 +#if (defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)) && QT_VERSION >= 0x050C00 // Linux && Qt >= 5.12.0 if (!(getenv("DO_NOT_UNSET_XDG_SESSION_TYPE"))) { @@ -375,7 +375,7 @@ ScaleFactorManager scaleFactorManager(OsType::WIN); #endif -#if defined(Q_OS_LINUX) +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS) ScaleFactorManager scaleFactorManager(OsType::LINUX); #endif @@ -389,7 +389,7 @@ } #endif -#if defined(Q_OS_LINUX) +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS) #if QT_VERSION >= 0x050000 if (!(getenv("DO_NOT_UNSET_QT_QPA_PLATFORMTHEME")) && getenv("QT_QPA_PLATFORMTHEME")) { @@ -413,7 +413,7 @@ #endif MegaApplication app(argc, argv); -#if defined(Q_OS_LINUX) +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS) theapp = &app; appToWaitForSignal = QString::fromUtf8("\"%1\"").arg(MegaApplication::applicationFilePath()); for (int i = 1; i < argc; i++) @@ -437,7 +437,7 @@ } #endif -#if defined(Q_OS_LINUX) && QT_VERSION >= 0x050600 +#if (defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)) && QT_VERSION >= 0x050600 for (const auto& screen : app.screens()) { MegaApi::log(MegaApi::LOG_LEVEL_INFO, ("Device pixel ratio on '" + @@ -590,7 +590,7 @@ WindowsPlatform_exiting = true; #endif -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS) theapp = nullptr; #endif return toret;