diff options
Diffstat (limited to 'src/crypto')
-rw-r--r-- | src/crypto/crypto.cpp | 2 | ||||
-rw-r--r-- | src/crypto/oaes_lib.c | 12 | ||||
-rw-r--r-- | src/crypto/slow-hash.c | 2 | ||||
-rw-r--r-- | src/crypto/tree-hash.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/crypto/crypto.cpp b/src/crypto/crypto.cpp index 1e39a8b04..fa7b1b580 100644 --- a/src/crypto/crypto.cpp +++ b/src/crypto/crypto.cpp @@ -41,7 +41,7 @@ #include "crypto.h" #include "hash.h" -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) #include <alloca.h> #else #include <stdlib.h> diff --git a/src/crypto/oaes_lib.c b/src/crypto/oaes_lib.c index c86b8caa0..7fbe96e4c 100644 --- a/src/crypto/oaes_lib.c +++ b/src/crypto/oaes_lib.c @@ -37,13 +37,13 @@ static const char _NR[] = { #include <stdlib.h> #include <stdio.h> -// Both OS X and FreeBSD don't need malloc.h -#if !defined(__APPLE__) && !defined(__FreeBSD__) +// OS X, FreeBSD, and OpenBSD don't need malloc.h +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) #include <malloc.h> #endif -// FreeBSD also doesn't need timeb.h -#ifndef __FreeBSD__ +// FreeBSD, and OpenBSD also don't need timeb.h +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) #include <sys/timeb.h> #else #include <sys/time.h> @@ -470,7 +470,7 @@ OAES_RET oaes_sprintf( #ifdef OAES_HAVE_ISAAC static void oaes_get_seed( char buf[RANDSIZ + 1] ) { - #ifndef __FreeBSD__ + #if !defined(__FreeBSD__) && !defined(__OpenBSD__) struct timeb timer; struct tm *gmTimer; char * _test = NULL; @@ -502,7 +502,7 @@ static void oaes_get_seed( char buf[RANDSIZ + 1] ) #else static uint32_t oaes_get_seed(void) { - #ifndef __FreeBSD__ + #if !defined(__FreeBSD__) && !defined(__OpenBSD__) struct timeb timer; struct tm *gmTimer; char * _test = NULL; diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index 544083fb0..903a3792f 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -421,7 +421,7 @@ 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__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) 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 e90b23841..7a128e4b0 100644 --- a/src/crypto/tree-hash.c +++ b/src/crypto/tree-hash.c @@ -34,7 +34,7 @@ #include "hash-ops.h" -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) #include <alloca.h> #else #include <stdlib.h> |