diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-12-15 14:36:35 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-12-15 14:36:35 +0200 |
commit | 29735c8f8fda032833924285c2da7ea9b15a77c7 (patch) | |
tree | 6be858f3fd0b29be74c87ba37e3512f3a4808acf /src/crypto | |
parent | Merge pull request #1458 (diff) | |
parent | Preliminary support for DragonFly BSD (diff) | |
download | monero-29735c8f8fda032833924285c2da7ea9b15a77c7.tar.xz |
Merge pull request #1459
b00da61e Preliminary support for DragonFly BSD (Antonio Huete Jimenez)
Diffstat (limited to 'src/crypto')
-rw-r--r-- | src/crypto/crypto.cpp | 2 | ||||
-rw-r--r-- | src/crypto/oaes_lib.c | 3 | ||||
-rw-r--r-- | src/crypto/slow-hash.c | 3 | ||||
-rw-r--r-- | src/crypto/tree-hash.c | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/src/crypto/crypto.cpp b/src/crypto/crypto.cpp index 250779ac3..6ceb944cd 100644 --- a/src/crypto/crypto.cpp +++ b/src/crypto/crypto.cpp @@ -42,7 +42,7 @@ #include "crypto.h" #include "hash.h" -#if !defined(__FreeBSD__) && !defined(__OpenBSD__) +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) #include <alloca.h> #else #include <stdlib.h> diff --git a/src/crypto/oaes_lib.c b/src/crypto/oaes_lib.c index 2cf598e05..f054a16f4 100644 --- a/src/crypto/oaes_lib.c +++ b/src/crypto/oaes_lib.c @@ -34,7 +34,8 @@ #include <stdio.h> // OS X, FreeBSD, and OpenBSD don't need malloc.h -#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) \ + && !defined(__DragonFly__) #include <malloc.h> #endif diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index 2ac303a36..66d9ca5d9 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -442,7 +442,8 @@ 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__) || defined(__FreeBSD__) || defined(__OpenBSD__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ + defined(__DragonFly__) hp_state = mmap(0, MEMORY, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, 0, 0); #else diff --git a/src/crypto/tree-hash.c b/src/crypto/tree-hash.c index 7a128e4b0..d73f0d959 100644 --- a/src/crypto/tree-hash.c +++ b/src/crypto/tree-hash.c @@ -34,7 +34,7 @@ #include "hash-ops.h" -#if !defined(__FreeBSD__) && !defined(__OpenBSD__) +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) #include <alloca.h> #else #include <stdlib.h> |