1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-17 10:10:23 +00:00

Make crashCatcherInstall no-op for Android

The crashcatcher.cpp is not linked on Android because it's not supported but the
function need to have some definition. Make it empty to avoid link failures.
This commit is contained in:
elsid 2024-02-11 03:12:52 +01:00
parent 3301ebb2cb
commit 1e07935366
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625
2 changed files with 5 additions and 3 deletions

View File

@ -583,8 +583,6 @@ static bool isDebuggerPresent()
void crashCatcherInstall(int argc, char** argv, const std::filesystem::path& crashLogPath) void crashCatcherInstall(int argc, char** argv, const std::filesystem::path& crashLogPath)
{ {
#if (defined(__APPLE__) || (defined(__linux) && !defined(ANDROID)) || (defined(__unix) && !defined(ANDROID)) \
|| defined(__posix))
if (argc == 2 && strcmp(argv[1], crash_switch) == 0) if (argc == 2 && strcmp(argv[1], crash_switch) == 0)
handleCrash(Files::pathToUnicodeString(crashLogPath).c_str()); handleCrash(Files::pathToUnicodeString(crashLogPath).c_str());
@ -595,5 +593,4 @@ void crashCatcherInstall(int argc, char** argv, const std::filesystem::path& cra
Log(Debug::Info) << "Crash handler installed"; Log(Debug::Info) << "Crash handler installed";
else else
Log(Debug::Warning) << "Installing crash handler failed"; Log(Debug::Warning) << "Installing crash handler failed";
#endif
} }

View File

@ -3,6 +3,11 @@
#include <filesystem> #include <filesystem>
#if (defined(__APPLE__) || (defined(__linux) && !defined(ANDROID)) || (defined(__unix) && !defined(ANDROID)) \
|| defined(__posix))
void crashCatcherInstall(int argc, char** argv, const std::filesystem::path& crashLogPath); void crashCatcherInstall(int argc, char** argv, const std::filesystem::path& crashLogPath);
#else
inline void crashCatcherInstall(int /*argc*/, char** /*argv*/, const std::filesystem::path& /*crashLogPath*/) {}
#endif
#endif #endif