diff options
author | NoodleDoodleNoodleDoodleNoodleDoodleNoo <NoodleDoodleNoodleDoodleNoodleDoodleNoo@users.noreply.github.com> | 2014-06-19 23:49:25 -0700 |
---|---|---|
committer | NoodleDoodleNoodleDoodleNoodleDoodleNoo <NoodleDoodleNoodleDoodleNoodleDoodleNoo@users.noreply.github.com> | 2014-06-19 23:49:25 -0700 |
commit | e12ccdf905cf1f7ada04ba07840d20946db2a19a (patch) | |
tree | b1dbe64f537ef15496c7a70819237f90fc3bec06 | |
parent | Merge pull request #48 from NoodleDoodleNoodleDoodleNoodleDoodleNoo/master (diff) | |
download | monero-e12ccdf905cf1f7ada04ba07840d20946db2a19a.tar.xz |
Update slow-hash.c
1. Fix for Mac OSX compilation errors.
-rw-r--r-- | src/crypto/slow-hash.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ -304,8 +304,13 @@ void slow_hash_allocate_state(void) 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 |