mirror of
https://github.com/hasherezade/pe-sieve.git
synced 2026-10-11 21:49:57 +00:00
[BUGFIX] Fixe compatibility with MinGW. Added dbghelp to linked libs
This commit is contained in:
@@ -328,6 +328,7 @@ set (used_libs
|
||||
ntdll.lib
|
||||
shlwapi
|
||||
imagehlp
|
||||
dbghelp
|
||||
)
|
||||
|
||||
# dependencies
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user