diff --git a/client/hardnested/hardnested_bf_core.c b/client/hardnested/hardnested_bf_core.c index 3c0c044..b9c0691 100644 --- a/client/hardnested/hardnested_bf_core.c +++ b/client/hardnested/hardnested_bf_core.c @@ -146,7 +146,7 @@ bitslice_test_nonces_t bitslice_test_nonces_dispatch; #if defined (_WIN32) #define malloc_bitslice(x) __builtin_assume_aligned(_aligned_malloc((x), MAX_BITSLICES/8), MAX_BITSLICES/8) #define free_bitslice(x) _aligned_free(x) -#elif defined (__APPLE__) +#elif defined (__APPLE__) || defined(__NetBSD__) static void *malloc_bitslice(size_t x) { char *allocated_memory; if (posix_memalign((void**)&allocated_memory, MAX_BITSLICES/8, x)) { diff --git a/client/hardnested/hardnested_bitarray_core.c b/client/hardnested/hardnested_bitarray_core.c index aca4f14..4127d96 100644 --- a/client/hardnested/hardnested_bitarray_core.c +++ b/client/hardnested/hardnested_bitarray_core.c @@ -147,7 +147,7 @@ inline uint32_t *MALLOC_BITARRAY(uint32_t x) { #if defined (_WIN32) return __builtin_assume_aligned(_aligned_malloc((x), __BIGGEST_ALIGNMENT__), __BIGGEST_ALIGNMENT__); -#elif defined (__APPLE__) +#elif defined (__APPLE__) || defined(__NetBSD__) uint32_t *allocated_memory; if (posix_memalign((void**)&allocated_memory, __BIGGEST_ALIGNMENT__, x)) { return NULL;