diff --git a/src/engine/framework/VirtualMachine.cpp b/src/engine/framework/VirtualMachine.cpp index 76e9ac9dc3..b4db6a1995 100644 --- a/src/engine/framework/VirtualMachine.cpp +++ b/src/engine/framework/VirtualMachine.cpp @@ -79,9 +79,6 @@ static Cvar::Cvar workaround_naclSystem_freebsd_disableQualification( // Many BSDs have a Linuxulator, for now we only tested one. #if defined(__linux__) || defined(__FreeBSD__) #define DAEMON_NACL_RUNTIME_LINUX -#if YOKAI_ARCH_I686 || YOKAI_ARCH_ARM64 || YOKAI_ARCH_ARMHF -#define DAEMON_NACL_BOOSTRAP_ENABLED -#endif // !(YOKAI_ARCH_I686 || YOKAI_ARCH_ARM64 || YOKAI_ARCH_ARMHF) #endif // defined(__linux__) || defined(DAEMON_LINUXULATOR) #endif // defined(DAEMON_NACL_RUNTIME_ENABLED) @@ -182,6 +179,7 @@ static Cvar::Cvar vm_nacl_qualification( namespace VM { +#if defined(DAEMON_NACL_RUNTIME_LINUX) // https://github.com/Unvanquished/Unvanquished/issues/944#issuecomment-744454772 static void CheckMinAddressSysctlTooLarge() { @@ -206,6 +204,7 @@ static void CheckMinAddressSysctlTooLarge() } #endif // __linux__ } +#endif // DAEMON_NACL_RUNTIME_LINUX #if defined(DAEMON_NACL_RUNTIME_LINUX) && (defined(YOKAI_ARCH_ARM64) || defined(YOKAI_ARCH_ARMHF)) static bool OnArm64() @@ -358,86 +357,6 @@ static std::pair InternalLoadModule(std::pair(probe.data()), - nullptr, - }; - - execve(probe.data(), argv, environ); - - switch (errno) - { - case ENOEXEC: - // The kernel cannot execute the probe. - _exit(100); - - case ENOENT: - case EACCES: - // Missing or inaccessible probe. - _exit(101); - - default: - _exit(102); - } - } - - int status; - if (waitpid(pid, &status, 0) < 0) { - return ExeSupport::Unknown; - } - - if (!WIFEXITED(status)) { - return ExeSupport::Unknown; - } - - switch (WEXITSTATUS(status)) - { - case 100: - return ExeSupport::Unsupported; - - case 101: - case 102: - return ExeSupport::Unknown; - - default: - // The probe has been executed properly. - return ExeSupport::Supported; - } -} -#endif // defined(DAEMON_NACL_RUNTIME_LINUX) && defined(NACL_ARCH_ARM64) - #if defined(DAEMON_NACL_RUNTIME_ENABLED) static std::pair CreateNaClVM(std::pair pair, Str::StringRef name, bool debug, bool extract, int debugLoader) { const std::string& libPath = FS::GetLibPath(); @@ -462,80 +381,15 @@ static std::pair CreateNaClVM(std::pair CreateNaClVM(std::pair CreateNaClVM(std::pair CreateNaClVM(std::pair