mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
More preprocessor fixes for slow-hash
This commit is contained in:
parent
cf91545734
commit
aba3497fdd
1 changed files with 3 additions and 3 deletions
|
@ -295,7 +295,7 @@ STATIC INLINE void aes_pseudo_round_xor(const uint8_t *in, uint8_t *out,
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
BOOL SetLockPagesPrivilege(HANDLE hProcess, BOOL bEnable)
|
||||
{
|
||||
struct
|
||||
|
@ -333,7 +333,7 @@ void slow_hash_allocate_state(void)
|
|||
if(hp_state != NULL)
|
||||
return;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
SetLockPagesPrivilege(GetCurrentProcess(), TRUE);
|
||||
hp_state = (uint8_t *) VirtualAlloc(hp_state, MEMORY, MEM_LARGE_PAGES |
|
||||
MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
||||
|
@ -365,7 +365,7 @@ void slow_hash_free_state(void)
|
|||
free(hp_state);
|
||||
else
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
VirtualFree(hp_state, MEMORY, MEM_RELEASE);
|
||||
#else
|
||||
munmap(hp_state, MEMORY);
|
||||
|
|
Loading…
Reference in a new issue