diff options
author | Zachary Michaels <mikezackles@gmail.com> | 2014-08-06 13:08:15 -0400 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-09-15 22:33:10 +0200 |
commit | aba3497fdd6c47500dbbbce54c29900f24a3d55b (patch) | |
tree | d55d188a358937c1496c80a06290bbbb7e0d4eb2 /src/crypto | |
parent | Correct includes for mingw in slow-hash (diff) | |
download | monero-aba3497fdd6c47500dbbbce54c29900f24a3d55b.tar.xz |
More preprocessor fixes for slow-hash
Diffstat (limited to 'src/crypto')
-rw-r--r-- | src/crypto/slow-hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index 2d3197d62..d4f27e1e1 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -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); |