Skip to content

Commit

Permalink
inject: Fix MinGW cross-compilation errors on Ubuntu 20.04.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfonseca committed Sep 18, 2020
1 parent 88c8ce0 commit 1aa8391
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inject/injectee_iat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,17 @@ _assert(const char *_Message, const char *_File, unsigned _Line)
}


#ifndef __MINGW32__

EXTERN_C void
_wassert(const wchar_t * _Message, const wchar_t *_File, unsigned _Line)
{
debugPrintf("Assertion failed: %S, file %S, line %u\n", _Message, _File, _Line);
TerminateProcess(GetCurrentProcess(), 1);
}

#endif /* !__MINGW32__ */


static HMODULE WINAPI
MyLoadLibraryA(LPCSTR lpLibFileName);
Expand Down
4 changes: 4 additions & 0 deletions inject/injectee_mhook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,17 @@ _assert(const char *_Message, const char *_File, unsigned _Line)
}


#ifndef __MINGW32__

EXTERN_C void
_wassert(const wchar_t * _Message, const wchar_t *_File, unsigned _Line)
{
debugPrintf("Assertion failed: %S, file %S, line %u\n", _Message, _File, _Line);
TerminateProcess(GetCurrentProcess(), 1);
}

#endif /* !__MINGW32__ */


static void
MyCreateProcessCommon(BOOL bRet,
Expand Down

0 comments on commit 1aa8391

Please sign in to comment.