[BUGFIX] Fixe compatibility with MinGW. Added dbghelp to linked libs

This commit is contained in:
hasherezade
2026-05-30 15:04:05 +02:00
parent 515ffa3eae
commit a050993f51
2 changed files with 9 additions and 2 deletions
+1
View File
@@ -328,6 +328,7 @@ set (used_libs
ntdll.lib
shlwapi
imagehlp
dbghelp
)
# dependencies
+8 -2
View File
@@ -6,6 +6,12 @@
#include <dbghelp.h>
#include "dbg_help_wrapper.h"
#ifdef _MSC_VER
#define ALIGNED8 __declspec(align(8))
#else
#define ALIGNED8 __attribute__((aligned(8)))
#endif
//---
class ProcessSymbolsManager
{
@@ -246,7 +252,7 @@ public:
return "";
}
__declspec(align(8)) char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME] = { 0 };
ALIGNED8 char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME] = { 0 };
PSYMBOL_INFO symbol = reinterpret_cast<PSYMBOL_INFO>(buffer);
symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
@@ -274,7 +280,7 @@ public:
return false;
}
__declspec(align(8)) char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME ] = { 0 };
ALIGNED8 char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME ] = { 0 };
PSYMBOL_INFO symbol = reinterpret_cast<PSYMBOL_INFO>(buffer);
symbol->SizeOfStruct = sizeof(SYMBOL_INFO);