From e12ccdf905cf1f7ada04ba07840d20946db2a19a Mon Sep 17 00:00:00 2001 From: NoodleDoodleNoodleDoodleNoodleDoodleNoo Date: Thu, 19 Jun 2014 23:49:25 -0700 Subject: Update slow-hash.c 1. Fix for Mac OSX compilation errors. --- src/crypto/slow-hash.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/crypto') diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index 46a5b5f30..b4a1c8085 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -303,9 +303,14 @@ void slow_hash_allocate_state(void) SetLockPagesPrivilege(GetCurrentProcess(), TRUE); hp_state = (uint8_t *) VirtualAlloc(hp_state, MEMORY, MEM_LARGE_PAGES | MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); +#else +#if defined(__APPLE__) + hp_state = mmap(0, MEMORY, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANON, 0, 0); #else hp_state = mmap(0, MEMORY, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, 0, 0); +#endif if(hp_state == MAP_FAILED) hp_state = NULL; #endif -- cgit v1.2.3