From d1736e5dd478dd35b4b0c4016269075e6992dfa4 Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Sun, 9 Nov 2025 22:38:27 +0800 Subject: [PATCH] fix: Module base macOs --- src/MaaCore/Utils/ExceptionStacktrace.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/MaaCore/Utils/ExceptionStacktrace.hpp b/src/MaaCore/Utils/ExceptionStacktrace.hpp index 65a03ea175..283717fea9 100644 --- a/src/MaaCore/Utils/ExceptionStacktrace.hpp +++ b/src/MaaCore/Utils/ExceptionStacktrace.hpp @@ -14,6 +14,18 @@ #include #include #include +#ifdef __APPLE__ +#include +#include +#endif +#elif defined(__linux__) +#include +#include +#endif + +#ifdef __APPLE__ +#include +#include #endif #include @@ -36,7 +48,7 @@ public: const struct mach_header* header = _dyld_get_image_header(0); return reinterpret_cast(header); #else // Linux and other Unix-like systems - // 从/proc/self/maps读取基址 + // 从/proc/self/maps读取基址 std::ifstream maps("/proc/self/maps"); std::string line; if (std::getline(maps, line)) {